tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mikael Helbo Kjær <>
Subject Jasper problems
Date Thu, 30 Nov 2000 10:01:48 GMT
Hi all.

I`ve recently being developing a custom taglibrary for my company. In doing
so I have uncovered some problems with Jasper in version 3.1 during my test.
Now we are supporting Regular expressions as extensions to our tags like
excerpt from our jsp page:
	<dbp:attribute name="format" value="\\s*(\\w)\\w+\\s+(\\w)\\w+"/>

Now this however gives a huge hickup in Jasper as it gives the following

org.apache.jasper.JasperException: Unable to compile class for
va:213: Invalid escape character.

Now this regular expression is not only wrong it`s totally mangled
from: "\\s*(\\w)\\w+\\s+(\\w)\\w+"
to: "s\*\(w\)w+s+\(w\)w+"

Jasper also does this with {0}{1} and turns it into \{1\}\{2\} on the same

Now this works on Resin without any hickup or problems, so what is wrong. 

I have looked a little at the source code and discovered the Jasper in the
JspReader class used strips the \\ character from any value ( in the
parseToken(true) method ) . This is IMHO wrong and stops me from seriously
using or testing this functionality on Tomcat (which by the way works for
all my other tests only this has me stomped). Now what makes it add those
strange \\ characters (evaluated to \ on output) I haven`t been able to
exactly trace yet, but I am still looking. Please somebody help so my
project can be absolutely sure it isn`t our fault.

Mikael Helbo Kjær
Software Developer @ DIA a/s

View raw message