trimDirectiveWhitespaces not working?

You need to change the web-app version to 2.5  as previous version does not support JSP 2.1. Weblogic server enforces the jsp version mentioned in the web-app of the web.xml.

 

It should be like this.

<web-app
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="2.5"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd">

 

I have uploaded a sample application which can be dowloaded from here