The full stack trace is:

2003-03-27 09:26:01 StandardWrapperValve[jsp]: Servlet.service() for servlet
jsp threw exception
java.lang.IllegalStateException
        at
org.apache.catalina.connector.HttpResponseFacade.sendRedirect(HttpResponseFa
cade.java:173)
        at
org.apache.jsp.sales_0005frep$jsp._jspService(sales_0005frep$jsp.java:88)
        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.valves.CertificatesValve.invoke(CertificatesValve.java:2
46)
        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.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.valves.AccessLogValve.invoke(AccessLogValve.java:468)
        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.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:458)
        at
org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:551)
        at java.lang.Thread.run(Thread.java:536)

Hope this helps,
Kenny

----- Original Message -----
From: "Erik Price" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Thursday, March 27, 2003 9:51 AM
Subject: Re: IllegalStateException on JSP page


>
>
> Kenny G. Dubuisson, Jr. wrote:
> > Hello all.  I've got a simple JSP page which is throwing an
> > IllegalStateException when I try to redirect the output to another page.
>
> What is the stack trace?
>
> > Here is a snippet of the code:
> >
> >          login = login.toUpperCase();
> >          Connection myConnection =
> >             DriverManager.getConnection(url, login, password);
> >          String sessionId = session.getId();
> >          Cookie cookie = new Cookie("sessionId", sessionId);
> >          response.addCookie(cookie);
> >          session.putValue("username", login);
> >          session.putValue("password", password);
> >          response.sendRedirect("rep_main.jsp");
> >          myConnection.close();
>
> I have found that debugging JSPs is a pain in the ass.  If you can
> refactor this code to a servlet or even just some external Java objects
> (hint: you can then access the data from the JSP using JavaBeans), you
> can keep your JSP cleaner, which means less debugging of JSPs.
>
> > I've searched through all the archives and never was able to find a
solution
> > to this for my case.  One thing I did read was about having to have a
> > "web.xml" file for my application (I currently don't have one nor know
what
> > to put in one).
>
> It is helpful to have this so you can specify context- and servlet-
> parameters as well as to perform servlet mappings.  But I suppose if
> your app uses only JSPs it is not necessary?  (Not sure.)
>
> > If you think this is the problem could you forward a
> > simple/basic web.xml?  Thanks in advance,
>
> Sure, there is one at:
>
> <http://jakarta.apache.org/tomcat/tomcat-4.1-doc/appdev/web.xml.txt>
>
>
> Erik
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to