Philz Recovery is a custom recovery for the Samsung Galaxy Tab 2 and is compatible with all variants including P3110, P3113 and P3110. It is better than clockwork mod recovery for Tab 2 7.0 as it supports touch input as well.
Backup all important stuff. We need to format the device.
Make sure using latest TWRP
Wipe -> Advanced Wipe:
Wipe -> Format Data -> Type yes to confirm
This is the most important step! It will keep some space for the footer! Without that encryption is not possible. If you do not perform this step, you will get this error.
E/Cryptfs ( 105): Orig filesystem overlaps crypto footer region. Cannot encrypt in place.
Set a Pin for Lockscreen
Encrypt your device.
Only by installing TWRP Philz Recovery, you will be able to flash Android 4.4.4+ and Android lollipop ROMs on your Galaxy Tab 2 7.0 device.