Hello,

We have been successfully running our JSF (Java Server Faces)
application deployed to Tomcat 6.0.18. Due to some of the security
issues that were fixed in the newer versions, we are trying to upgrade
to 6.0.24. While most of the things seem to be working fine, we came
across a specific issue that appears to be a Jasper issue.

In our application we use MyFaces and Tomahawk. We widely use one of
the components from Tomahawk called, validateRegExpr. This is a JSF
validator that ensures that the user input matches a predefined
regular expression, or else, raises an error. This does not work any
more with specific regex patterns such as the one below:

<t:validateRegExpr pattern="[\w \.-]+" />

Having the above line in a JSP produces a JSP compilation error with
the following message:

According to TLD or attribute directive in tag file, attribute pattern
does not accept any expressions

After doing some research, it appears to be an issue with having
backslash in the pattern. I tried to escape the backslash (with two
backslashes) and still the same error. In fact I can not even get a
text field to display a hard coded backslash. For example,

<t:inputText id="name" value="\" /> fails to compile with the error -
"Unterminated <t:inputText tag".

Escaping the backslash in the above line like - <t:inputText id="name"
value="\\" /> fails to compile with the error - "According to TLD or
attribute directive in tag file, attribute value does not accept any
expressions".

When I replace the jasper*.jar in the Tomcat with the older versions
from 6.0.18, everything seems to be working fine. However, I'm unsure
if this would cause any other issues.

Has any one else see this kind of error? Does any one know the best
workaround for this issue? The two workarounds I came with are -

1. Downgrade the jasper*.jar files
2. Update the TLDs of components to allow expressions as values by
adding the following tag to the TLD:
<rtexprvalue>true</rtexprvalue>

I'm not sure if either of these are good workarounds, but would love
to hear from you folks.

Regards,
Sai Pullabhotla

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to