[jboss-jira] [JBoss JIRA] (JBWEB-244) Incorrect reading of org.apache.catalina.SERVLET_VERSION
Carlos Oliveira (JIRA)
jira-events at lists.jboss.org
Tue Aug 7 08:03:07 EDT 2012
[ https://issues.jboss.org/browse/JBWEB-244?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Carlos Oliveira updated JBWEB-244:
----------------------------------
Attachment: test.war
For testing, deploy and call http://localhost:8080/test/index.jsp on browser. It shows the jboss-web.xml version instead of the web.xml version
> Incorrect reading of org.apache.catalina.SERVLET_VERSION
> --------------------------------------------------------
>
> Key: JBWEB-244
> URL: https://issues.jboss.org/browse/JBWEB-244
> Project: JBoss Web
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Core, Tomcat
> Affects Versions: JBossWeb-3.0.0.CR1
> Environment: Windows 7 Ultimate x64
> JDK 1.7_01
> jBoss AS 6.1.0-Final (clean install)
> Reporter: Carlos Oliveira
> Assignee: Remy Maucherat
> Attachments: test.war
>
>
> I'm migrating an old application from jBoss 4.0.5 to 6.1.0.
> This application has some some TLDs who does not accept return expression on some attributes, but unfortunately the JSPs use expressions on these attributes. This is working fine since the servlet version 2.3 and below accept this.
> The problem is that jBoss 6.1.0 isn't accepting this, it returns an error saying the attribute does not accept return expressions. My web.xml it's especifying version 2.3.
> I checked out the jboss web 3.0.0 code and verified that the class org.apache.jasper.compiler.JspConfig is responsible to check the servlet version (line 99), setting defaultIsELIgnored to true and thus allowing expressions.
> But this is not working correctly if the war has a jboss-web.xml especifying a DTD, like this example.
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.3V2//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_3_2.dtd">
> <jboss-web>
> <context-root>/test</context-root>
> </jboss-web>
> Jboss WEB is reading the DTD file from jboss-web.xml and replacing the SERVLET_VERSION on org.apache.catalina.core.StandardContext line 4383
> It works fine if i remove the DTD line from jboss-web.xml
> I attached an example, deploy the war file and call on browser the url http://localhost:8080/test/index.jsp, it shows the version from jboss-web.xml instead of the web.xml
> For now, as an workaround i created a Tomcat valve forcing the version
> request.getContext().getServletContext().setAttribute("org.apache.catalina.SERVLET_VERSION", "2.3");
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list