I don't know what is going wrong (so many things could go wrong ...) ! Just
an idea, how is your mapping done for the JSP Redirector ?
My guess: I would bet you wrote something like :
<servlet-mapping>
<servlet-name>JspRedirector</servlet-name>
<url-pattern>/*.jsp</url-pattern>
</servlet-mapping>
which means that the forward tries to call the JSP page but as *.jsp is
mapped to the JSP Redirector, it calls the JSP redirector first, which
executes the test, which calls the redirector ....
-Vincent
----- Original Message -----
From: "Rakesh Bhalla" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "Vincent Massol" <[EMAIL PROTECTED]>
Sent: Thursday, September 20, 2001 6:40 AM
Subject: StackTraceException while doing PageContext: forward ...
> Hello,
> --- Vincent Massol <[EMAIL PROTECTED]> wrote:
> > > > I think what you want to write is :
> > > >
> > > > public class MyJspTest extends JspTestCase
> > > > {
> > > > public void testXXX()
> > > > {
> > > > pageContext.forward("/some/path/myjsp.jsp");
> > > >
> > > > // (optional) assert values that the JSP would put in the
> > > > // session or pageContext or servlet context scope. In your
> > > > // example, there are none.
> >
> > assertEquals("some value", session.getAttribute("some name"));
> >
> > > > }
> Hello I tried the pageContext forwarding as suggested above.
> Let me elaborate on that.
>
> My TestJspTestCase.java looked something like this.
>
> public void beginOut(ServletTestRequest str) throws Exception {
> }
>
> public void testOut() throws IOException, ServletException {
> pageContext.forward("/examplesWebApp/hello.jsp" );
> assertEquals( pageContext.getAttribute("name") , "RED" ) ;
> }
>
> public void endOut(ServletTestRequest theConnection) throws
> IOException {
>
> }
>
>
> HELLO.JSP:
>
> <body>
> <% session.putAttribute("name","Red" ) %>
>
> ...
> </body>
>
> What I am trying to do here is that I set some attribute in the
> session context and am trying to assert in the server. ( in testXX()
> i.e. testOut() method ) .
> I use WebLogic v6.1 under WinNT v4.0 and I place the
> TestJspTestCase.class in /wlserver6.1/config/examples/serverclasses
> because it is in CLASSPATH of the server. Also I place hello.jsp
> mentioned in the TestCase in
> wlserver6.1/config/examples/applications/examplesWebApp . When I
> launch the test what I get is a StackOverflow error as follows:
>
> The StackTrace is so big that I thought it would be better to attach
> the text file, archived as zip file. So herewith I have attached a
> zip file which contains the TestJspTestCase.java and stacktrace.txt .
>
> Where have I possibly gone wrong ?
> Can somebody help me ?
>
>
> Thanks.
>
>
>
>
>
>
>
>
>
> =====
> Thanks.
> Rakesh Bhalla.
>
> __________________________________________________
> Terrorist Attacks on U.S. - How can you help?
> Donate cash, emergency relief information
> http://dailynews.yahoo.com/fc/US/Emergency_Information/