LPS-51789 Simplify jsp logic

do not merge 'till https://github.com/sergiogonzalez/liferay-portal/pull/1844 is in master