tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "shyam" <sh...@adamshand.net>
Subject Re: StackOverFlowError--Please help
Date Tue, 30 Sep 2003 20:43:10 GMT
thanks for all your help. It was my problem. I didnt define the servlet
properly in the web.xml . Poor stuff . sorri for the trouble.
thanks,
shyam
----- Original Message ----- 
From: "Shapira, Yoav" <Yoav.Shapira@mpi.com>
To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
Sent: Tuesday, September 30, 2003 3:39 PM
Subject: RE: StackOverFlowError--Please help


>
> Howdy,
> Can servlet1 also forward to servlet2, or vice versa?  Is the code
> snippet taken from either servlet1 or servlet2?  If so, you still could
> have infinite forwarding -> StackOverFlowError.
>
> Yoav Shapira
> Millennium ChemInformatics
>
>
> >-----Original Message-----
> >From: shyam [mailto:shyam@adamshand.net]
> >Sent: Tuesday, September 30, 2003 2:57 PM
> >To: Tomcat Users List
> >Subject: Re: StackOverFlowError--Please help
> >
> >sorri about the code snippet. Heres a complete picture.
> >if(flag)
> >{
> >    rd = context.getRequestDispatcher("/servlet1");
> >rd.forward(request,response);
> >}
> >else
> >{
> >      rd = context.getRequestDispatcher("/servlet2");
> >    rd.forward(request,response);
> >}
> >so when the flag is true it should be forwarded to servlet 1 else
> servlet
> >2.
> >----- Original Message -----
> >From: "Jeff Tulley" <JTULLEY@novell.com>
> >To: <tomcat-user@jakarta.apache.org>
> >Sent: Tuesday, September 30, 2003 2:53 PM
> >Subject: Re: StackOverFlowError--Please help
> >
> >
> >> Is it just me, or are both halves of that if statement exactly
> >> identical?  Based on this snippet of code only, you should get the
> same
> >> results regardless of flag's value.  Is there other code that checks
> >> this flag, and does the getRequestDispatcher call differently?
> >>
> >> It sounds like you are forwarding to yourself, and that whatever
> logic
> >> determines the value of flag is based on the forwarded request
> >> parameters, so it will always keep determining it to be false and
> >> forward once more to itself => infinite recursion.
> >>
> >> Jeff Tulley  (jtulley@novell.com)
> >> (801)861-5322
> >> Novell, Inc., The Leading Provider of Net Business Solutions
> >> http://www.novell.com
> >>
> >> >>> shyam@adamshand.net 9/30/03 12:39:12 PM >>>
> >> Hi All,
> >> I am having a problem when doing servlet chaining. I have a code
> >> snippet
> >> like this
> >>
> >> if(flag)
> >> {
> >>     requestdispatcher.forward(request,response);
> >> }
> >> else
> >> {
> >>     requestdispatcher.forward(request,response);
> >> }
> >>
> >> The problem is if flag is true the forward and I get the desired
> >> result. But
> >> in the else case I get a java.lang.StackOverFlowError . The stack
> trace
> >> is
> >>
> >>
> >> java.lang.StackOverflowError at
> >>
> >org.apache.catalina.core.ApplicationHttpRequest.removeAttribute(Applica
> tion
> >H
> >> ttpRequest.java:229)
> >>
> >> And the error is at the forward of the false case. Can somebody help
> me
> >> with
> >> this problem.
> >>
> >> Thanks in advance,
> >> shyam
> >>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> 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
>
>
>
>
> This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged.  This e-mail is intended only for the individual(s) to
whom it is addressed, and may not be saved, copied, printed, disclosed or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.
>
>
> ---------------------------------------------------------------------
> 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