Re: Session managing in Tomcat problem
Hi Tracy, if you will pay for my flight to NZ, I would be happy to give you a live demo :) Adam On 11/04/2003 11:50 PM Tracy Saward wrote: Hi, We are independent consultants currently undertaking a study of satisfaction among end-users of Open Source Software, notably Tomcat, for a company which has asked us for recommendations in terms of deploying policy for such systems. I was hoping to set up a quick (5 minute) telephone interview with yourself or the appropriate person to discuss your experience with this product to date. Please feel free to telephone me anytime, or reply to this e-mail indicating an appropriate time/person for me to recall. Thanks for your gracious attention to this request! Best regards, Tracy Tracy Saward Fleetward Group 85 Maskell Street St Heliers Auckland New Zealand Tel: 64 9 575 1626 Fax: 64 9 585 0939 Mail: [EMAIL PROTECTED] -Original Message- From: Yansheng Lin [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 05, 2003 11:03 AM To: 'Tomcat Users List' Subject: RE: Session managing in Tomcat problem 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:2 54) 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(ApplicationDispatch er.j ava:432) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher .jav a:356) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:10 58) . . . 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 -- struts 1.1 + tomcat 5.0.12 + java 1.4.2 Linux 2.4.20 RH9 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Session managing in Tomcat problem
Hi, We are independent consultants currently undertaking a study of satisfaction among end-users of Open Source Software, notably Tomcat, for a company which has asked us for recommendations in terms of deploying policy for such systems. I was hoping to set up a quick (5 minute) telephone interview with yourself or the appropriate person to discuss your experience with this product to date. Please feel free to telephone me anytime, or reply to this e-mail indicating an appropriate time/person for me to recall. Thanks for your gracious attention to this request! Best regards, Tracy Tracy Saward Fleetward Group 85 Maskell Street St Heliers Auckland New Zealand Tel: 64 9 575 1626 Fax: 64 9 585 0939 Mail: [EMAIL PROTECTED] -Original Message- From: Christopher Schultz [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 05, 2003 11:10 AM To: Tomcat Users List Subject: Re: Session managing in Tomcat problem Yansheng, > 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 > > And it's kind of strange since in my struts-config, I set the action > to be request scope. Well, if you need something to be in the session, then why are you asking why the session keep getting re-created? Isn't it doing exactly what you want it to do? -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]
RE: Session managing in Tomcat problem
Hi, We are independent consultants currently undertaking a study of satisfaction among end-users of Open Source Software, notably Tomcat, for a company which has asked us for recommendations in terms of deploying policy for such systems. I was hoping to set up a quick (5 minute) telephone interview with yourself or the appropriate person to discuss your experience with this product to date. Please feel free to telephone me anytime, or reply to this e-mail indicating an appropriate time/person for me to recall. Thanks for your gracious attention to this request! Best regards, Tracy Tracy Saward Fleetward Group 85 Maskell Street St Heliers Auckland New Zealand Tel: 64 9 575 1626 Fax: 64 9 585 0939 Mail: [EMAIL PROTECTED] -Original Message- From: Yansheng Lin [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 05, 2003 11:03 AM To: 'Tomcat Users List' Subject: RE: Session managing in Tomcat problem 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:2 54) 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(ApplicationDispatch er.j ava:432) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher .jav a:356) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:10 58) . . . 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Session managing in Tomcat problem
stopher Schultz [mailto:[EMAIL PROTECTED] Sent: November 4, 2003 3:27 PM To: Tomcat Users List Subject: Re: Session managing in Tomcat problem Yansheng, > This is my entire jsp page (status.jsp): > > <%@ page language="java" %> > <%@ page session="false" %> > <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> > That's odd: you are definately setting the scope to request. You should inquire on the struts list about this. -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]
Re: Session managing in Tomcat problem
Yansheng, This is my entire jsp page (status.jsp): <%@ page language="java" %> <%@ page session="false" %> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> That's odd: you are definately setting the scope to request. You should inquire on the struts list about this. -chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Session managing in Tomcat problem
This is my entire jsp page (status.jsp): <%@ page language="java" %> <%@ page session="false" %> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> I don't understand it now. And I thought I got scope thing figured out in Struts. Can you explain? Thanks! -Original Message- From: Christopher Schultz [mailto:[EMAIL PROTECTED] Sent: November 4, 2003 3:18 PM To: Tomcat Users List Subject: Re: Session managing in Tomcat problem Yansheng, > What do you mean I need something to be in the session? Tomcat needs? > > I was forwarding user back to the request page after finish my execute() method. > > I don't use session at all. You are using a struts bean tag to pull a value out of the session in one of your JSPs. That's the one that needs the session. -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]
Re: Session managing in Tomcat problem
Yansheng, What do you mean I need something to be in the session? Tomcat needs? I was forwarding user back to the request page after finish my execute() method. I don't use session at all. You are using a struts bean tag to pull a value out of the session in one of your JSPs. That's the one that needs the session. -chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Session managing in Tomcat problem
What do you mean I need something to be in the session? Tomcat needs? I was forwarding user back to the request page after finish my execute() method. I don't use session at all. -Original Message- From: Christopher Schultz [mailto:[EMAIL PROTECTED] Sent: November 4, 2003 3:10 PM To: Tomcat Users List Subject: Re: Session managing in Tomcat problem Yansheng, > 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 > > And it's kind of strange since in my struts-config, I set the action to be > request scope. Well, if you need something to be in the session, then why are you asking why the session keep getting re-created? Isn't it doing exactly what you want it to do? -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]
Re: Session managing in Tomcat problem
Yansheng, 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 > And it's kind of strange since in my struts-config, I set the action to be request scope. Well, if you need something to be in the session, then why are you asking why the session keep getting re-created? Isn't it doing exactly what you want it to do? -chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Session managing in Tomcat problem
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]
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]
RE: Session managing in Tomcat problem
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. -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: November 4, 2003 11:45 AM To: Tomcat Users List Subject: RE: Session managing in Tomcat problem Howdy, >I want to prevent tomcat creating new session for a particular >request(i.e., You can't do that without hacking tomcat internals to the point where it is no longer a Servlet Specification-compliant server. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - 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]
RE: Session managing in Tomcat problem
Howdy, >I want to prevent tomcat creating new session for a particular >request(i.e., You can't do that without hacking tomcat internals to the point where it is no longer a Servlet Specification-compliant server. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Session managing in Tomcat problem
Hi I am not sure how to do this: My setup: -implemented javax.servlet.http.HttpSessionListener -in app's web.xml: mySessionListener -tomcat handles the creation of sessions and each of them expires after idling for an hour. I want to prevent tomcat creating new session for a particular request(i.e., from a certain IP address or url). How do I go about doing it? (When a new session was created, it contains nothing that tells me about the request). Thanks! -Yan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]