shared session question
does anybody knows how can I use the findSession function to retrieve shared sessions from multiples applications ? I have been trying with a local StandardManager class, but it ins't work to me. What I want is to be able of getting some attributes from a session created in another application for security purposes. I will be very appretiate if anobody can help me. -- SAN - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: General session question
The short answer is: yes. However (unless you've enabled the uploadTimeout), this is the least of your worries with an upload that will take several minutes. Philipp Leusmann [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, will a session timeout when one servlet takes longer to process than the session-timeout? For example for uploading-servlets. Thanks, Philipp - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: General session question
Ok, thanks for the answer. But what would my worries be? Philipp -Ursprüngliche Nachricht- Von: news [mailto:[EMAIL PROTECTED] Auftrag von Bill Barker Gesendet: Freitag, 29. August 2003 05:15 An: [EMAIL PROTECTED] Betreff: Re: General session question The short answer is: yes. However (unless you've enabled the uploadTimeout), this is the least of your worries with an upload that will take several minutes. Philipp Leusmann [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, will a session timeout when one servlet takes longer to process than the session-timeout? For example for uploading-servlets. Thanks, Philipp - 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: AW: General session question
1) Denial of service attack. 2) If the upload is a large file and you try to buffer the file into memory instead of writing it directly as a temp file to disk - you can get an a DOS for Out of memory. 3) If you don't take care in the writing to disk, you can DOS yourself by filling up the filesystem -Tim Philipp Leusmann wrote: Ok, thanks for the answer. But what would my worries be? Philipp -Ursprüngliche Nachricht- Von: news [mailto:[EMAIL PROTECTED] Auftrag von Bill Barker Gesendet: Freitag, 29. August 2003 05:15 An: [EMAIL PROTECTED] Betreff: Re: General session question The short answer is: yes. However (unless you've enabled the uploadTimeout), this is the least of your worries with an upload that will take several minutes. Philipp Leusmann [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, will a session timeout when one servlet takes longer to process than the session-timeout? For example for uploading-servlets. Thanks, Philipp - 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]
General session question
Hi, will a session timeout when one servlet takes longer to process than the session-timeout? For example for uploading-servlets. Thanks, Philipp - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat Session Question
Hi, Is it possible to set the session expiration to infinite? So that Tomcat session will never die. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
session question for tomcat 4.0.1 and 4.0.2
I posted the following message a while ago and have not got any response. So, I tried it on tomcat 4.0.2 release. However, I got the same result. I would appreciate your help. 2. I am trying to use isNew() method on session to detect whether a session is newly created or not. For example, HttpSession session = request.getSession(); if (session.isNew()) { // do something } However, session.isNew() always returns false. I tried several other combinations such as: request.getSession(true) and I got the same result. Are these two known problems or anything I am missing? Zhiyong Li Analytical Solutions, SAS Institute (919) 653-2746 [EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: session question for tomcat 4.0.1 and 4.0.2
First, of all, the assumption is that you have not turned off session support using the JSP page directive, i.e. you do NOT have %@ page session=false The default is true, so as long as you do not have this, you are fine. Now, session.isNew() would continually return false if the following conditions were true: 1. the browser you are testing with is set to NOT accept cookies, AND 2. you are not encoding your URL's in which case Tomcat can not manage sessions using URL rewriting, e.g. you should be doing the following in your .jsp files : a href=%=response.encodeURL(page1.jsp)%Page 1/a - Charlie On Wednesday 13 February 2002 07:08 am, Zhiyong Li wrote: I posted the following message a while ago and have not got any response. So, I tried it on tomcat 4.0.2 release. However, I got the same result. I would appreciate your help. 2. I am trying to use isNew() method on session to detect whether a session is newly created or not. For example, HttpSession session = request.getSession(); if (session.isNew()) { // do something } However, session.isNew() always returns false. I tried several other combinations such as: request.getSession(true) and I got the same result. Are these two known problems or anything I am missing? Zhiyong Li Analytical Solutions, SAS Institute (919) 653-2746 [EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: session question for tomcat 4.0.1 and 4.0.2
Hi Charlie, I beg to differ. I am seeing the same problem as report by Zhiyong Li and have been unable to resolve it (and I have a Servlet and do not turn off the session). In case where the browser is not set to accept cookies, session.isNew() should always return true and not false (as you say). Arif. -Original Message- From: Charlie Toohey [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 13, 2002 1:23 PM To: Tomcat Users List; Zhiyong Li Subject: Re: session question for tomcat 4.0.1 and 4.0.2 First, of all, the assumption is that you have not turned off session support using the JSP page directive, i.e. you do NOT have %@ page session=false The default is true, so as long as you do not have this, you are fine. Now, session.isNew() would continually return false if the following conditions were true: 1. the browser you are testing with is set to NOT accept cookies, AND 2. you are not encoding your URL's in which case Tomcat can not manage sessions using URL rewriting, e.g. you should be doing the following in your .jsp files : a href=%=response.encodeURL(page1.jsp)%Page 1/a - Charlie On Wednesday 13 February 2002 07:08 am, Zhiyong Li wrote: I posted the following message a while ago and have not got any response. So, I tried it on tomcat 4.0.2 release. However, I got the same result. I would appreciate your help. 2. I am trying to use isNew() method on session to detect whether a session is newly created or not. For example, HttpSession session = request.getSession(); if (session.isNew()) { // do something } However, session.isNew() always returns false. I tried several other combinations such as: request.getSession(true) and I got the same result. Are these two known problems or anything I am missing? Zhiyong Li Analytical Solutions, SAS Institute (919) 653-2746 [EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: ===Session Question===
put the object in the request with setParameter(). the scope for this object is the request... it will be destroyed when you call the 2nd servlet. []´s Daniel A. anil wrote: Hello, I do have servlet that process request and forward to another servlet. like. -request- Servlet1---servlet2 session-obj-1session-obj1(destroy session-obj1 request is done-user gets html back) At the end of sevlet2, user get html window back. I want setup a session object in servlet valid only for that request. I mean it should not valid beyond servlet2. if I use request.getSession(x), this session-obj1 is valid until the browser is closed. is there anyway to do this without calling removeAttribute() thanks anil
RE: ===Session Question===
If you just want the request object (the parameters) to be passed call the servlet2 with the request object and finish what you're doing and the request object is gong after that. Simple. You can also create an hashtable in the session with those values from the request object and delete the hashtable from the session when you're finished, this way you can use a redirect to the next servlet, so people don't have to resubmit the request on a refresh.. Have fun, Martin van den Bemt -Original Message- From: anil [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 22, 2001 9:26 PM To: tomcat Subject: ===Session Question=== Hello, I do have servlet that process request and forward to another servlet. like. -request- Servlet1---servlet2 session-obj-1session-obj1(destroy session-obj1 request is done-user gets html back) At the end of sevlet2, user get html window back. I want setup a session object in servlet valid only for that request. I mean it should not valid beyond servlet2. if I use request.getSession(x), this session-obj1 is valid until the browser is closed. is there anyway to do this without calling removeAttribute() thanks anil
===Session Question===
Hello, I do have servlet that process request and forward to another servlet. like. -request- Servlet1---servlet2 session-obj-1session-obj1(destroy session-obj1 request is done-user gets html back) At the end of sevlet2, user get html window back. I want setup a session object in servlet valid only for that request. I mean it should not valid beyond servlet2. if I use request.getSession(x), this session-obj1 is valid until the browser is closed. is there anyway to do this without calling removeAttribute() thanks anil
Re: ===Session Question===
have you try to invalidate the session ? - Original Message - From: anil [EMAIL PROTECTED] To: tomcat [EMAIL PROTECTED] Sent: Tuesday, May 22, 2001 12:26 PM Subject: ===Session Question=== Hello, I do have servlet that process request and forward to another servlet. like. -request- Servlet1---servlet2 session-obj-1session-obj1(destroy session-obj1 request is done-user gets html back) At the end of sevlet2, user get html window back. I want setup a session object in servlet valid only for that request. I mean it should not valid beyond servlet2. if I use request.getSession(x), this session-obj1 is valid until the browser is closed. is there anyway to do this without calling removeAttribute() thanks anil
RE: ===Session Question===
hi anil, i hope i've got your intention, you want to pass an object graph from servlet1 to servlet2. tomcat provides session management through request.getSession().setAttribute() these objects are accessible for the duration of the session. If you only want the object graph to live for the lifespan of a single request then use request.setAttribute() and it will automatically destroy() when the response is returned to the tomcat-request-interceptor-responder-web-server-thingy ( i think that's its' technical name ) ; warren. -Original Message- From: anil [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 23 May 2001 5:26 AM To: tomcat Subject: ===Session Question=== Hello, I do have servlet that process request and forward to another servlet. like. -request- Servlet1---servlet2 session-obj-1session-obj1(destroy session-obj1 request is done-user gets html back) At the end of sevlet2, user get html window back. I want setup a session object in servlet valid only for that request. I mean it should not valid beyond servlet2. if I use request.getSession(x), this session-obj1 is valid until the browser is closed. is there anyway to do this without calling removeAttribute() thanks anil
Re: ===Session Question===
I was thinking at something more simple then this. When you pass an object between servlet1 and servlet2, you pass also the request object ( HttpServletRequest..) So, in servlet2 you can do HttpSession session = request.getSession(false);right?.. ( where request is the request object passed by servlet1).. After you serve you're client you can simple do a : session.invalidate(); and you're session that was passed from Servlet1 is no more a valid one. Alin - Original Message - From: Warren Crossing [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, May 22, 2001 5:26 PM Subject: RE: ===Session Question=== hi anil, i hope i've got your intention, you want to pass an object graph from servlet1 to servlet2. tomcat provides session management through request.getSession().setAttribute() these objects are accessible for the duration of the session. If you only want the object graph to live for the lifespan of a single request then use request.setAttribute() and it will automatically destroy() when the response is returned to the tomcat-request-interceptor-responder-web-server-thingy ( i think that's its' technical name ) ; warren. -Original Message- From: anil [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 23 May 2001 5:26 AM To: tomcat Subject: ===Session Question=== Hello, I do have servlet that process request and forward to another servlet. like. -request- Servlet1---servlet2 session-obj-1session-obj1(destroy session-obj1 request is done-user gets html back) At the end of sevlet2, user get html window back. I want setup a session object in servlet valid only for that request. I mean it should not valid beyond servlet2. if I use request.getSession(x), this session-obj1 is valid until the browser is closed. is there anyway to do this without calling removeAttribute() thanks anil
Re: ===Session Question===
No, I do not want to invalidate whole session. I have some varibales that I want keep. But I want some to alive only in the request. thanks anil Alin Simionoiu wrote: have you try to invalidate the session ? - Original Message - From: anil [EMAIL PROTECTED] To: tomcat [EMAIL PROTECTED] Sent: Tuesday, May 22, 2001 12:26 PM Subject: ===Session Question=== Hello, I do have servlet that process request and forward to another servlet. like. -request- Servlet1---servlet2 session-obj-1session-obj1(destroy session-obj1 request is done-user gets html back) At the end of sevlet2, user get html window back. I want setup a session object in servlet valid only for that request. I mean it should not valid beyond servlet2. if I use request.getSession(x), this session-obj1 is valid until the browser is closed. is there anyway to do this without calling removeAttribute() thanks anil
Re: ===Session Question===
Hi Warren, Thanks for the magic to destroy the session object when the response is delivered to client. That's the idea. I have some attributes that I do not want to go away as long as tomcat lives but need to have the freedom to change. some to live only for the request. Like say that I have a object graph like salesman list that does not change very often. I want to keep them as context attribute. But on the customerDetailDisplay I want to keep the customer for the one single request only where I got request for the CustomerDetail information. With Jserv, I used to keep them in a singleton (so called application objects) . Now with Tomcat 3.2.1 + Jboss 2.1, the salesman list might change once in awhile (so that does not qualify as static type object), but it will stay the same for long period of time. for recap: 1. object graph that might change once in awhile, but will used by different servlets (hope to keep them as context session object) - how??? getContext.setAttribute(me,myGlobalObject);??? 2. object graph that should live only for the request. OK: request.setAttribute(oh!my,myRequestObjet); next line always will be: getServletConfig().getServletContext().getRequestDispatcher(page).forward(); idea is to have the request hit the servlet Controller first and then go to the view. How do you guys handle situation like this in tomcat?? thanks anil Warren Crossing wrote: hi anil, i hope i've got your intention, you want to pass an object graph from servlet1 to servlet2. tomcat provides session management through request.getSession().setAttribute() these objects are accessible for the duration of the session. If you only want the object graph to live for the lifespan of a single request then use request.setAttribute() and it will automatically destroy() when the response is returned to the tomcat-request-interceptor-responder-web-server-thingy ( i think that's its' technical name ) ; warren.
Re: ===Session Question===
Thanks for the idea Alin. But that will invalidate all the attributes in the session. I want to keep some. And some to keep only in the request context (what ever you call). request.getSession(true) - this will create new session if you do not have a session. I am not sure what will happen with request.getSession(false) if you already have a session, I guess you can't access any session variables in that servlet because it is kind of ignoring the session. (I am not an expert on this). anil Alin Simionoiu wrote: I was thinking at something more simple then this. When you pass an object between servlet1 and servlet2, you pass also the request object ( HttpServletRequest..) So, in servlet2 you can do HttpSession session = request.getSession(false);right?.. ( where request is the request object passed by servlet1).. After you serve you're client you can simple do a : session.invalidate(); and you're session that was passed from Servlet1 is no more a valid one. Alin
RE: ===Session Question===
Anil Just on top of normal session validation, add 1 session attribute in servlet1 to indicate that this session is valid+ and remove this attribute in servlet2. So, after leaving serlvet2, the session is valid everywhere except servlet2. Kenneth Kwan -Original Message- From: anil [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 23, 2001 11:04 AM To: [EMAIL PROTECTED] Subject:Re: ===Session Question=== Thanks for the idea Alin. But that will invalidate all the attributes in the session. I want to keep some. And some to keep only in the request context (what ever you call). request.getSession(true) - this will create new session if you do not have a session. I am not sure what will happen with request.getSession(false) if you already have a session, I guess you can't access any session variables in that servlet because it is kind of ignoring the session. (I am not an expert on this). anil Alin Simionoiu wrote: I was thinking at something more simple then this. When you pass an object between servlet1 and servlet2, you pass also the request object ( HttpServletRequest..) So, in servlet2 you can do HttpSession session = request.getSession(false);right?.. ( where request is the request object passed by servlet1).. After you serve you're client you can simple do a : session.invalidate(); and you're session that was passed from Servlet1 is no more a valid one. Alin
Re: ===Session Question===
Use singleton. The way you described in your previuos design is not singleton, singleton means one instance per application, your way was just static class. The basic idea would be smth like this public class MySingleton { private MySingleton() {}; // constructor MUST be private private myInstance MySingleton; // this is your object; public MySingleton getInstance(){ if (mInstance==null) mInstance=new MySingleton(); return mInstance; } } From your code to get to this object you will use MySingleton obj=MySingleton.getInstance(); Hope this will help Regards, Egidijus - Original Message - From: anil [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, May 23, 2001 4:51 AM Subject: Re: ===Session Question=== Hi Warren, Thanks for the magic to destroy the session object when the response is delivered to client. That's the idea. I have some attributes that I do not want to go away as long as tomcat lives but need to have the freedom to change. some to live only for the request. Like say that I have a object graph like salesman list that does not change very often. I want to keep them as context attribute. But on the customerDetailDisplay I want to keep the customer for the one single request only where I got request for the CustomerDetail information. With Jserv, I used to keep them in a singleton (so called application objects) . Now with Tomcat 3.2.1 + Jboss 2.1, the salesman list might change once in awhile (so that does not qualify as static type object), but it will stay the same for long period of time. for recap: 1. object graph that might change once in awhile, but will used by different servlets (hope to keep them as context session object) - how??? getContext.setAttribute(me,myGlobalObject);??? 2. object graph that should live only for the request. OK: request.setAttribute(oh!my,myRequestObjet); next line always will be: getServletConfig().getServletContext().getRequestDispatcher(page).forward(); idea is to have the request hit the servlet Controller first and then go to the view. How do you guys handle situation like this in tomcat?? thanks anil Warren Crossing wrote: hi anil, i hope i've got your intention, you want to pass an object graph from servlet1 to servlet2. tomcat provides session management through request.getSession().setAttribute() these objects are accessible for the duration of the session. If you only want the object graph to live for the lifespan of a single request then use request.setAttribute() and it will automatically destroy() when the response is returned to the tomcat-request-interceptor-responder-web-server-thingy ( i think that's its' technical name ) ; warren.
Re: Session Question
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, May 15, 2001 12:54 PM Subject: Session Question I am currently writing a pretty complex data entry HTML page for an application. The HTML has 7 different frames where data is input, one represents the master table and the others detail tables. I am trying to come up with a way to keep all of the data entered into each frame for updating the database (I want to update all the records in one transaction). There some obvious ways of doing this as with invisible fields on the master frame, and URL rewriting (cookies are out in this case) but I have also been looking into using the Session object. I know the object is used for shopping carts on commercial web sites but would it be a good to use it to keep all the input values for various input forms? There will be from 40 - 50 items of data stored in the session object and a user will only be able to one form at a time? Yes, sessions are provided for this kind of thing. Note that Tomcat uses cookies to maintain the session if it can. It will use URL rewriting if cookies are disabled but you may have to amend your pages to support that. It may be worth looking at a web application framework such as Jakarta Struts that can run within Tomcat and help with some of this. John.
RE: Session Question
When it comes to form data, I always make a user object and bind this to a session. The user object will contain all my put/get calls. Therefore, I usually don't care what frame and/or page a user is on as long as the session is up, I have the user object to get my data. Then you can have another object used to parse through and do what you want with the data contained in the user/session object. Doug -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 15, 2001 7:54 AM To: [EMAIL PROTECTED] Subject: Session Question I am currently writing a pretty complex data entry HTML page for an application. The HTML has 7 different frames where data is input, one represents the master table and the others detail tables. I am trying to come up with a way to keep all of the data entered into each frame for updating the database (I want to update all the records in one transaction). There some obvious ways of doing this as with invisible fields on the master frame, and URL rewriting (cookies are out in this case) but I have also been looking into using the Session object. I know the object is used for shopping carts on commercial web sites but would it be a good to use it to keep all the input values for various input forms? There will be from 40 - 50 items of data stored in the session object and a user will only be able to one form at a time? Thanks in advance Jeff Sulman
Re: Session Question
The session is usually used to persist objects between tranactions with the client (browser). If you are gathering several input fields to write to the database towards the end of the session then using the session is the way to go. Or, you could use Java Script to gather all of the input fields from the frames you mentioned into hidden fields of the form being submitted and write to the database when the form is submitted. --- [EMAIL PROTECTED] wrote: I am currently writing a pretty complex data entry HTML page for an application. The HTML has 7 different frames where data is input, one represents the master table and the others detail tables. I am trying to come up with a way to keep all of the data entered into each frame for updating the database (I want to update all the records in one transaction). There some obvious ways of doing this as with invisible fields on the master frame, and URL rewriting (cookies are out in this case) but I have also been looking into using the Session object. I know the object is used for shopping carts on commercial web sites but would it be a good to use it to keep all the input values for various input forms? There will be from 40 - 50 items of data stored in the session object and a user will only be able to one form at a time? Thanks in advance Jeff Sulman __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
Re: Session Question
John, In what ways may I have amend my pages due to cookies being disabled? John Holman j.g.holman@qTo: [EMAIL PROTECTED] mw.ac.ukcc: Subject: Re: Session Question 05/15/01 07:15 AM Please respond to tomcat-user - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, May 15, 2001 12:54 PM Subject: Session Question I am currently writing a pretty complex data entry HTML page for an application. The HTML has 7 different frames where data is input, one represents the master table and the others detail tables. I am trying to come up with a way to keep all of the data entered into each frame for updating the database (I want to update all the records in one transaction). There some obvious ways of doing this as with invisible fields on the master frame, and URL rewriting (cookies are out in this case) but I have also been looking into using the Session object. I know the object is used for shopping carts on commercial web sites but would it be a good to use it to keep all the input values for various input forms? There will be from 40 - 50 items of data stored in the session object and a user will only be able to one form at a time? Yes, sessions are provided for this kind of thing. Note that Tomcat uses cookies to maintain the session if it can. It will use URL rewriting if cookies are disabled but you may have to amend your pages to support that. It may be worth looking at a web application framework such as Jakarta Struts that can run within Tomcat and help with some of this. John.
Re: Session Question
When cookies are disabled, http requests to your web application have to include the session id in order for the web container to find the correct session. For example, if a page contains a link pointing to your servlet, the URL for that link must be encoded using HttpServletResponse.encodeURL(). This means the page cannot be a static one. John. - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, May 15, 2001 1:34 PM Subject: Re: Session Question John, In what ways may I have amend my pages due to cookies being disabled? John Holman j.g.holman@qTo: [EMAIL PROTECTED] mw.ac.ukcc: Subject: Re: Session Question 05/15/01 07:15 AM Please respond to tomcat-user - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, May 15, 2001 12:54 PM Subject: Session Question I am currently writing a pretty complex data entry HTML page for an application. The HTML has 7 different frames where data is input, one represents the master table and the others detail tables. I am trying to come up with a way to keep all of the data entered into each frame for updating the database (I want to update all the records in one transaction). There some obvious ways of doing this as with invisible fields on the master frame, and URL rewriting (cookies are out in this case) but I have also been looking into using the Session object. I know the object is used for shopping carts on commercial web sites but would it be a good to use it to keep all the input values for various input forms? There will be from 40 - 50 items of data stored in the session object and a user will only be able to one form at a time? Yes, sessions are provided for this kind of thing. Note that Tomcat uses cookies to maintain the session if it can. It will use URL rewriting if cookies are disabled but you may have to amend your pages to support that. It may be worth looking at a web application framework such as Jakarta Struts that can run within Tomcat and help with some of this. John.
RE: Session Question
Call HttpServletRequest.encodeURL() or encodeRedirectURL() on each URL you put in the page. -- Bill K. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 15, 2001 5:34 AM To: [EMAIL PROTECTED] Subject: Re: Session Question John, In what ways may I have amend my pages due to cookies being disabled? John Holman j.g.holman@qTo: [EMAIL PROTECTED] mw.ac.ukcc: Subject: Re: Session Question 05/15/01 07:15 AM Please respond to tomcat-user - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, May 15, 2001 12:54 PM Subject: Session Question I am currently writing a pretty complex data entry HTML page for an application. The HTML has 7 different frames where data is input, one represents the master table and the others detail tables. I am trying to come up with a way to keep all of the data entered into each frame for updating the database (I want to update all the records in one transaction). There some obvious ways of doing this as with invisible fields on the master frame, and URL rewriting (cookies are out in this case) but I have also been looking into using the Session object. I know the object is used for shopping carts on commercial web sites but would it be a good to use it to keep all the input values for various input forms? There will be from 40 - 50 items of data stored in the session object and a user will only be able to one form at a time? Yes, sessions are provided for this kind of thing. Note that Tomcat uses cookies to maintain the session if it can. It will use URL rewriting if cookies are disabled but you may have to amend your pages to support that. It may be worth looking at a web application framework such as Jakarta Struts that can run within Tomcat and help with some of this. John.
session question
hi folks, im using tc4-b1 with apache1.3.19 and after many days i got the warp-connection woking (using webapp). i found that there was no docs about installing these stuff, so i'm wonder why this list doesnt contain many questions about "getting apache and tomcat working TOGETHER". Anyway, i mentioned that there may be a bug in tomcat-session-handling. the case: i create a new session(a cookie will be send to the user)and next page the script looks if a session is set. But all the time there is NO session set, so a new session is created! the example pages of tocat examples/jsp/... working in the same way. Now my question: is there any kown bug about apache doesnn support (tc-created-)sessions ?? Thanks for anwering, Sascha.
RE: Connection/Session question
Hi, Randy. Thank you for your help. However, I am still a little bit confused. For HTTP/1.1 implementation, the connection from client to web server should be persistent. So how can the connection to the client be closed after the client get the first page which containing the applet. Do you mean, after each reqest-response pair communication, the connection is closed? Every request-response pair communication uses different connection from other pair communication, is that right? If so, the applet will use different connection for each request-response communication. Is that right? Thank you. Jianming Wang -Original Message- From: Randy Layman [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 08, 2001 3:13 PM To: [EMAIL PROTECTED] Subject: RE: Connection/Session question Not really. The client will download the content of the JSP page (which contains the applet). Assuming that you are using Tomcat in standalone, the connection to the client will be closed. Then the applet will start and the make its connection. So you will have two connections, although they will be at different times. Unless you set the cookie for the session or form your URL to include the sessionid your applet will not join an already existing session. Instead a new one will be formed. Randy -Original Message- From: Wang, Jianming [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 08, 2001 10:59 AM To: '[EMAIL PROTECTED]' Subject: Connection/Session question Hello, I have a question: - If I have a page containing a applet and some other HTML content, and the applet uses a URLConnection to connect to the web server. In this case, how many connections/sessions I have? 2 connections? one from the page itself and one from the applet? Could any guru please help? Thanks in advance. Jianming Wang - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Connection/Session question
Hello, I have a question: - If I have a page containing a applet and some other HTML content, and the applet uses a URLConnection to connect to the web server. In this case, how many connections/sessions I have? 2 connections? one from the page itself and one from the applet? Could any guru please help? Thanks in advance. Jianming Wang - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Session question
Hello, I have a question: - If I have a page containing a applet and some other HTML content, and the applet uses a URLConnection to connect to the web server. In this case, how many connections/sessions I have? 2 connections? one from the page itself and one from the applet? Could any guru please help? Thanks in advance. Jianming Wang - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Connection/Session question
Not really. The client will download the content of the JSP page (which contains the applet). Assuming that you are using Tomcat in standalone, the connection to the client will be closed. Then the applet will start and the make its connection. So you will have two connections, although they will be at different times. Unless you set the cookie for the session or form your URL to include the sessionid your applet will not join an already existing session. Instead a new one will be formed. Randy -Original Message- From: Wang, Jianming [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 08, 2001 10:59 AM To: '[EMAIL PROTECTED]' Subject: Connection/Session question Hello, I have a question: - If I have a page containing a applet and some other HTML content, and the applet uses a URLConnection to connect to the web server. In this case, how many connections/sessions I have? 2 connections? one from the page itself and one from the applet? Could any guru please help? Thanks in advance. Jianming Wang - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]