Thanks for the reply I have editied the jspRedirector and was careful not to insert any characters between the closing and opening script tags.
I don't know what other info I can give with out sending everything which is not very practical. I basically commented out all code in my test case, in my taglib etc but no luck... I am able to continue working (my test cases pass), but I would just like to know why it's happening. Thanks Eric Thanks Eric --- Nicholas Lesiecki <[EMAIL PROTECTED]> wrote: > Eric, > > Give us a little more context. Strange things can > cause the response to be > committed. If you edited the redirector and > accidentally inserted a carriage > return, the jspRedirector's generated servlet might > be sending something... > > More info please... > > Cheers, > > Nick > > -----Original Message----- > From: Eric Walker [mailto:[EMAIL PROTECTED]] > Sent: Monday, October 15, 2001 7:39 PM > To: [EMAIL PROTECTED] > Subject: RE: pageContext.getSession(); > > > Hi > > I made the change to jspRedirector.jsp and now the > session object is there but now I am getting the > following: > > 2001-10-15 21:36:14 - Ctx( /unitplan ): > IllegalStateException in: R( /unitplan + > /jspRedirector.jsp + null) OutputStream is already > being used for this request > > I don't have any code at this point that writes to > the > OutputStream. Whats going on? > > > Thanks > Eric > > > > > > > --- David Winterfeldt <[EMAIL PROTECTED]> > wrote: > > I think Cactus (v1.0) creates the session for the > > session variable, but this is never set for the > > pageContext. So if you test a JSP tag that takes > > the > > pageContext, it can't get the session. > PageContext > > doesn't have a method to set the session. You > would > > have to call initialize with all the correct > > parameters. I also had to edit the redirector.jsp > > to > > get this working. Ignore this if things have > > changed > > since v1.0. > > > > David > > > > --- Nicholas Lesiecki <[EMAIL PROTECTED]> wrote: > > > It's probably the order of steps. The > pageContext > > > might be created (with a > > > null session) before Cactus creates the session > > > based on the user's > > > "automaticSession" value. > > > > > > I might get a chance to write a unit test for > this > > > in the next couple of > > > days. > > > > > > Cheers, > > > > > > Nick > > > > > > -----Original Message----- > > > From: Vincent Massol [mailto:[EMAIL PROTECTED]] > > > Sent: Saturday, October 13, 2001 4:55 AM > > > To: [EMAIL PROTECTED] > > > Subject: Re: pageContext.getSession(); > > > > > > > > > Hi Eric, > > > > > > ----- Original Message ----- > > > From: "Eric Walker" <[EMAIL PROTECTED]> > > > To: <[EMAIL PROTECTED]> > > > Sent: Friday, October 12, 2001 4:49 PM > > > Subject: pageContext.getSession(); > > > > > > > > > > Hi > > > > > > > > I have a JspTestCase that calls > > > > pageContext.getSession() in setup. this value > is > > > > always null. any ideas? > > > > > > > > > > yes, I have an idea ... a bug ! I have > reproduced > > > the problem. What I wanted > > > to do is the following : > > > - in redirector.jsp, set session to false so > that > > no > > > session is created at > > > that time. This is because the creation of the > > > session depends whether the > > > user has set setAutomaticSession to true or > false > > > - internally, create the session by calling > > > HttpServletRequest.getSession(true) if automatic > > > session is true > > > > > > For some reason it does not work and need to be > > > corrected. In the meantime, > > > if you wish to progress with your tests, simply > > edit > > > redirector.jsp and > > > modfiy session="false" for session="true" > > > > > > Could you create a bug report for this > > > (http://nagoya.apache.org/bugzilla/) > > > ? Thanks a lot > > > > > > Anyone knows why it is not working ? > > > -Vincent > > > > > > > Thanks > > > > Eric > > > > > > > > > > > > public void setUp() throws JspException > > > > { . > > > > . > > > > . > > > > > > > > // why is this null? > > > > > > > assertTrue(null!=pageContext.getSession()); > > > > > > > > . > > > > . > > > > . > > > > } > > > > > > > > public void begin10HitsQuery(WebRequest > > > request) > > > > { > > > > request.setAutomaticSession(true); > > > > } > > > > > > Note: not needed as this is the default. > > > > > > > > > > > > > > > > > > > > > __________________________________________________ > > > > Do You Yahoo!? > > > > Make a great connection at Yahoo! Personals. > > > > http://personals.yahoo.com > > > > > > > > > > > > > __________________________________________________ > > Do You Yahoo!? > > Make a great connection at Yahoo! Personals. > > http://personals.yahoo.com > > > __________________________________________________ > Do You Yahoo!? > Make a great connection at Yahoo! Personals. > http://personals.yahoo.com > __________________________________________________ Do You Yahoo!? Make a great connection at Yahoo! Personals. http://personals.yahoo.com
