Hi Chris,  I just tried your suggestion, but I am getting a 500:

org.apache.jasper.JasperException: can't access SESSION_SCOPE without an
HttpSession
        at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254)
        at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java
:684)
        at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.j
ava:432)
        at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.jav
a:356)
        at
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1058)
        .
        .
        .

And it's kind of strange since in my struts-config, I set the action to be
request scope.
So I tried to trace back and finally got lost in the jungle of forwards's.
Oh btw, the ending tag(@>) is a typo from you suggestion right?  I use '%>'.
Thanks!

-Yan

-----Original Message-----
From: Christopher Schultz [mailto:[EMAIL PROTECTED] 
Sent: November 4, 2003 2:09 PM
To: Tomcat Users List
Subject: Re: Session managing in Tomcat problem


Yansheng,
> Then why does a session gets created again in the response stage?
> Does tomcat need that for anything?  That's annoying!
> 
> I invalidate the session at the end of execute() method in my 
> Struts Action class since I don't need it anymore, then I trace
> the code back to RequestDispatcher.java in javax.servlet, only
> to realize that the session was created again.

If you don't have:

<%@ page session="false" @>

... at the top of your page, then the JSP might create your session for 
you. This is because (I think) that session="true" is the default. If 
you want a session (or accept the default), then the resulting Java code 
has no choice but to include code to get the session.

It it annoying that you can't specify session="isAlredyExists" or 
something like that...

-chris


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to