You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2006/12/29 11:28:50 UTC

DO NOT REPLY [Bug 41258] New: - Escaping EL doesn't work in Tomcat 6

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41258>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41258

           Summary: Escaping EL doesn't work in Tomcat 6
           Product: Tomcat 6
           Version: 6.0.7
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Jasper
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: arjan.tijms@mbuyu.nl


We're using a number of custom tags that accept JSF (deferred) EL through
dynamic attributes. In JSP 2.1 this is illegal. I therefore tried to deactivate
expression evaluation by escaping the #{ pattern, but it seems that Tomcat 6.0.7
ignores this?

E.g.

<x:myTag id="someID" someDynamicAttribute="\#{someBean.someProp} />

Where myTag would be declared like this:

<tag>
      <description>...</description>
      <name>myTag</name>
      <tag-class>com.someClass</tag-class>
      <body-content>empty</body-content>
            <attribute>
          <description>...</description>
          <name>id</name>
          <required>false</required>
          <rtexprvalue>false</rtexprvalue>
      </attribute>

      <dynamic-attributes>true</dynamic-attributes>
  </tag>

This results in a:

org.apache.jasper.JasperException: Unable to compile class for JSP


where the deepest nested stack trace starts with:

java.lang.NullPointerException
   at
org.apache.jasper.compiler.Generator$GenerateVisitor.evaluateAttribute(Generator.java:2777)
   at
org.apache.jasper.compiler.Generator$GenerateVisitor.generateSetters(Generator.java:2988)
   at
org.apache.jasper.compiler.Generator$GenerateVisitor.generateCustomStart(Generator.java:2169)
   at
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1689)
   at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1507)
   at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
   at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2386)
   at
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1705)
   at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1507)
   at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)


In a simple outputText escaping is ignored too.

Something like:

<h:outputText value="\#{someBean.someProp}" />

would render a literal "\" before the value of "someProp".

Escaping EL is mentioned here:
http://java.sun.com/javaee/5/docs/tutorial/doc/JSPIntro7.html
e.g.

"Escape the #{ or ${characters as follows:
|some text \#{ some more\${ text
| and
|<my:tag someAttribute="sometext\#{more\${text" />"


|

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 41258] - Escaping EL doesn't work in Tomcat 6

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41258>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41258


funkman@joedog.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE




------- Additional Comments From funkman@joedog.org  2007-01-02 17:03 -------
Dup of 41257 

*** This bug has been marked as a duplicate of 41257 ***

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org