tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Funk <funk...@joedog.org>
Subject Re: ServletException
Date Wed, 25 Jun 2003 02:15:15 GMT
I meant to say since you have custom classes in your WEB-INF directory - your 
build/deploy process may have also copied the servlet api classes (or jars) 
into the WEB-INF directory (either in jar form to the lib dir, or to the 
classes dir).

-Tim

Woodrich, Jason D (Jason) wrote:
> I'm using a default install of Tomcat 4.1 and JK .. the JSP is being served through Apache
HTTP server and I don't believe the default tomcat includes the servlet api classes in WEB-INF.
> 
> Jason W
> - Avaya, Inc.
> - Knowledge Management & Tools Development 
> 
> 
> -----Original Message-----
> From: Tim Funk [mailto:funkman@joedog.org]
> Sent: Tuesday, June 24, 2003 7:58 PM
> To: Tomcat Users List
> Subject: Re: ServletException
> 
> 
> Odds are - you have the servlet api classes somewhere buried in your WEB-INF 
> dir and they shouldn't be there.
> 
> -Tim
> 
> Woodrich, Jason D (Jason) wrote:
> 
>>I'm getting a ServletException when I try to access methods in a HttpRequestFacade
passed to one of my own classes.  It's being casted as a HttpServletRequest in hopes to maintain
portability.  I'm able to access the methods fine from the JSP that passes the request variable,
and the reference is exactly the same when compared ..  but for some reason whenever I call
it from my class it freaks out and causes the ServletException which leads to the JasperException
.. 
>>
>>For example:
>>
>>jsp file:
>>
>><%@page language="java" import="<my package>.*" %> -->
>><%
>>    Cheese hi;
>>    hi=new Cheese(request);
>>%>
>>
>>part of the class:
>>
>>public class Cheese {
>>  private HttpServletRequest _request;
>>  public Cheese (HttpServletRequest req) {
>>    System.out.println("uri: "+req.getRequestURI());
>>    }
>>  }
>>
>>Returned is:
>>org.apache.jasper.JasperException: javax/servlet/http/HttpServletRequest
>>	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254)
>>	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
>>	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
>>	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
>>	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
>>	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
>>	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
>>	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>>	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>>	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
>>	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
>>	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>>	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>>	at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
>>	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
>>	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
>>	at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
>>	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
>>	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
>>	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
>>	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>>	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>>	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
>>	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
>>	at org.apache.catalina.valves.RequestDumperValve.invoke(RequestDumperValve.java:221)
>>	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
>>	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>>	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>>	at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:466)
>>	at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:585)
>>	at java.lang.Thread.run(Thread.java:536)
>>
>>
>>root cause 
>>
>>javax.servlet.ServletException: javax/servlet/http/HttpServletRequest
>>	at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:536)
>>	at org.apache.jsp.nav_jsp._jspService(nav_jsp.java:61)
>>	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
>>	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)
>>	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
>>	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
>>	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
>>	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
>>	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
>>	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
>>	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>>	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>>	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
>>	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
>>	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>>	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>>	at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
>>	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
>>	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
>>	at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
>>	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
>>	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
>>	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
>>	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>>	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>>	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
>>	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
>>	at org.apache.catalina.valves.RequestDumperValve.invoke(RequestDumperValve.java:221)
>>	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
>>	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>>	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>>	at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:466)
>>	at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:585)
>>	at java.lang.Thread.run(Thread.java:536)
>>
>>Anyone ever heard of anything like this?
>>
>>Thanks in advance
>>
>>Jason W
>>- Avaya, Inc.
>>- Knowledge Management & Tools Development
>> 
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>>
>>
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 
> 


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


Mime
View raw message