0 Replies Latest reply on Sep 14, 2004 9:55 AM by erez harari

    accessing session when invoked from another context

    erez harari Novice

      say i access WAR2 from WAR1:
      ServletContext c=application.getContext("/WAR2");
      RequestDispatcher disp=c.getRequestDispatcher("/test.jsp");
      disp.include(request,response);

      in WAR2/test.jsp i cannot get the session:
      request.getSession() throws java.lang.NullPointerException
      at org.apache.catalina.core.ApplicationHttpRequest.getSessionApplicationHttpRequest.java:546)
      at org.apache.catalina.core.ApplicationHttpRequest.getSessionApplicationHttpRequest.java:512)
      at javax.servlet.http.HttpServletRequestWrapper.getSessionHttpServletRequestWrapper.java:268)