Monday, 15 March 2010

java - Servlet 3.0 + JSTL + Struts 2 + Tiles 2 issues -



java - Servlet 3.0 + JSTL + Struts 2 + Tiles 2 issues -

are there known issues using jstl in servlet 3.0, struts 2 , tiles 2 application?

consider next snippet:

<tiles:useattribute id="list" name="importcss" classname="java.util.list" /> <c:foreach var="item" items="${list}"> <link rel="stylesheet" type="text/css" href="${item}.css" media="all"/> </c:foreach>

this result in list of css links beingness generated , works fine long our web.xml defines application servlet 2.4 application.

however, when changed utilize servlet 3.0, next error when accessing page:

jbweb000236: servlet.service() servlet default threw exception: java.io.filenotfoundexception: \ jbweb000088: requested resource (/application/web-inf/jsp/templates/${item}) not available

that mean in <link rel="stylesheet" type="text/css" href="${item}.css" media="all"/> look ${item} doesn't resolved, assume either using expressions or jstl has changed servlet 2.4 3.0 or theres library/configuration issue.

any ideas or suggestions how resolve problem?

working configuration:

jboss 7.2.0 struts 2.3.16.x tiles 2.2.2 jstl 1.2 servlet/webapp 2.4

broken configuration:

jboss 7.2.0 struts 2.3.16.x tiles 2.2.2 jstl 1.2 servlet/webapp 3.0 (the thing has changed)

additional info requested: seems work on windows (no errors far both servlet 2.4 , 3.0) not on linux (2.4 works, 3.0 doesn't).

as requested, here's head of our web.xml servlet 3.0:

<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="webapp_id" version="3.0">

update:

further tests seem hint @ packaging, i.e. when application beingness deployed packaged ear file, doesn't work - neither on windows nor on linux - while deploying application exploded ear works @ to the lowest degree on windows.

update 2 [solution]:

it turned out when our build process contained jsp precompilation task when building packaged application (the application had been migrated jboss 4.2.3 7.2.0). jboss didn't complain precompiled jsps far seems precompiling jsps neither needed nor supported jboss 6+ (https://community.jboss.org/message/735536) , our jspc task used old tomcat 5 jspc implementation naturally doesn't back upwards servlet 3.0.

it should permission issue, if works on windows , not in linux sure have permissions read web-inf/lib(chmod) or jstl jars.

java servlets jstl tiles

No comments:

Post a Comment