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 >
