tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "PELOQUIN,JEFFREY (HP-Boise,ex1)" <jeffrey.peloq...@hp.com>
Subject RE: using regexp in JSPs on Tomcat
Date Tue, 24 Dec 2002 18:20:24 GMT
Albert,

The stack trace you show would imply that your class is indeed throwing the
RESyntaxExeception.
I would guess you class definition or class method allows the passing of the
Exception to the invoking class, in this case Jasper.

I would remove any Throws RESyntaxException from the class/method def and
wrap a try/catch around the new RE() statement.

If that does not seem applicable you may need to post the jsp and class code
in question.

Does the RE statement depend on any parameters passed to it from the JSP
page?  If it does you may need check for nulls before creating the RE.

Jeff


-----Original Message-----
From: Albert Wang [mailto:Albert.Wang@bms.com]
Sent: Tuesday, December 24, 2002 11:10 AM
To: tomcat-user@jakarta.apache.org
Subject: using regexp in JSPs on Tomcat


Hi all,

I have a Java class which uses the Jakarta regexp package for some 
string parsing.  It works perfectly fine on its own.  I'm developing a 
set of JSPs, one of which instantiates this class and calls some 
methods.  However, Tomcat is throwing me the following exception:

javax.servlet.ServletException: org/apache/regexp/RESyntaxException
    at 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:471)
    at org.apache.jsp.viewSample$jsp._jspService(viewSample$jsp.java:367)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:201)
    at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
    at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
    at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
    at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
    at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:190)
    at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
    at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at 
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
    at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
    at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
    at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
    at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
    at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
)
    at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
    at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
    at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
    at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at 
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1027)
    at 
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125
)
    at java.lang.Thread.run(Thread.java:484)

As you can see, it's a regexp exception, but it's not my class that's 
throwing it, it's Jasper.  When I do not instantiate this class of mine, 
the JSP displays perfectly.  Is there some documented incompatibility 
with using regexp within JSPs on Tomcat?  The only workaround I can 
think of is to use some other regular expression package that isn't used 
inherently within Tomcat.  Any suggestions?

Thanks for any help,
-Al

-- 
------------------------------------------------------
Albert Wang
DDED Informatics
Bristol-Myers Squibb Pharmaceutical Research Institute



--
To unsubscribe, e-mail:
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message