RE: session data in Tomcat 5
I am a ZoneAlarm Pro user and when I first ran Tomcat on my desktop (with ZapPro) it sabotaged the cookies that TC was using, and from memory TC started to encode the session id in the URL. I would recommend looking at the privacy settings in zonelabs to see what it is doing with user identifiable information and particularly cookies. I havn't used Integrity before but it does have the forever troublesome "Privacy and Productivity Features" found in ZapPro. Start with downgrading the level of security for cookies (or set up your local PC to be trusted when it comes to cookies" and things might just get better for you. Regards, Shane. -Original Message- From: M.Hockings [mailto:[EMAIL PROTECTED] Sent: Monday, 24 May 2004 11:40 AM To: Tomcat Users List Subject: Re: session data in Tomcat 5 Ben Souther wrote: >>Ah Ben, I don't know if you have kids or not. But y'know how a kid can >>kinda look at the floor and shuffle their feet when caught doing >>something stupid. Well, keep that in mind as you read what I figured >>out... >> >> > >Believe me, you've nothing to feel stupid about. We've all been there. > >One thing to bear in mind, and I've had to tell myself this at least a dozen >times over the last year, is that there are thousands of people developing >commercial applications with Tomcat right now. If something fundamental, >like session handling, were ever to stop working, there would be hundreds of >posts to this list, all of them complaining about the same thing. Within a >day, there would be a fix for it. Over the next few days, you would see >hundreds more complaining about the same bug accompanied by hundreds of posts >from the likes of Yoav Shapira, Tim Funk, Philip Hanik, (and several others) >answering the same question over and over again, telling people exactly what >version to download to fix it. If you don't see that scenerio on this list, >keep looking at your own setup. > >I'm glad it's working for you. > >-Ben > >PS: Did the put the Zone Labs product on the server, or just on your desktop? > Thanks Ben. I kept telling myself that it should work just fine, particularly since Tomcat has been one of those things that for me "just works" with little or no tinkering (I like that kinda thing). The Zone Labs thing is installed on the desktop, when I open it's config window it's called "Zone Labs Integrity Desktop". When I click on the help/about link it sends me here http://www.zonelabs.com/store/content/company/corpsales/zapidOverview.jsp Mike - 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 data in Tomcat 5
I am a ZoneAlarm Pro user and when I first ran Tomcat on my desktop (with ZapPro) it sabotaged the cookies that TC was using, and from memory TC started to encode the session id in the URL. I would recommend looking at the privacy settings in zonelabs to see what it is doing with user identifiable information and particularly cookies. I havn't used Integrity before but it does have the forever troublesome "Privacy and Productivity Features" found in ZapPro. Start with downgrading the level of security for cookies (or set up your local PC to be trusted when it comes to cookies" and things might just get better for you. Regards, Shane. -Original Message- From: M.Hockings [mailto:[EMAIL PROTECTED] Sent: Monday, 24 May 2004 11:40 AM To: Tomcat Users List Subject: Re: session data in Tomcat 5 Ben Souther wrote: >>Ah Ben, I don't know if you have kids or not. But y'know how a kid can >>kinda look at the floor and shuffle their feet when caught doing >>something stupid. Well, keep that in mind as you read what I figured >>out... >> >> > >Believe me, you've nothing to feel stupid about. We've all been there. > >One thing to bear in mind, and I've had to tell myself this at least a dozen >times over the last year, is that there are thousands of people developing >commercial applications with Tomcat right now. If something fundamental, >like session handling, were ever to stop working, there would be hundreds of >posts to this list, all of them complaining about the same thing. Within a >day, there would be a fix for it. Over the next few days, you would see >hundreds more complaining about the same bug accompanied by hundreds of posts >from the likes of Yoav Shapira, Tim Funk, Philip Hanik, (and several others) >answering the same question over and over again, telling people exactly what >version to download to fix it. If you don't see that scenerio on this list, >keep looking at your own setup. > >I'm glad it's working for you. > >-Ben > >PS: Did the put the Zone Labs product on the server, or just on your desktop? > Thanks Ben. I kept telling myself that it should work just fine, particularly since Tomcat has been one of those things that for me "just works" with little or no tinkering (I like that kinda thing). The Zone Labs thing is installed on the desktop, when I open it's config window it's called "Zone Labs Integrity Desktop". When I click on the help/about link it sends me here http://www.zonelabs.com/store/content/company/corpsales/zapidOverview.jsp Mike - 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 data in Tomcat 5
Ben Souther wrote: Ah Ben, I don't know if you have kids or not. But y'know how a kid can kinda look at the floor and shuffle their feet when caught doing something stupid. Well, keep that in mind as you read what I figured out... Believe me, you've nothing to feel stupid about. We've all been there. One thing to bear in mind, and I've had to tell myself this at least a dozen times over the last year, is that there are thousands of people developing commercial applications with Tomcat right now. If something fundamental, like session handling, were ever to stop working, there would be hundreds of posts to this list, all of them complaining about the same thing. Within a day, there would be a fix for it. Over the next few days, you would see hundreds more complaining about the same bug accompanied by hundreds of posts from the likes of Yoav Shapira, Tim Funk, Philip Hanik, (and several others) answering the same question over and over again, telling people exactly what version to download to fix it. If you don't see that scenerio on this list, keep looking at your own setup. I'm glad it's working for you. -Ben PS: Did the put the Zone Labs product on the server, or just on your desktop? Thanks Ben. I kept telling myself that it should work just fine, particularly since Tomcat has been one of those things that for me "just works" with little or no tinkering (I like that kinda thing). The Zone Labs thing is installed on the desktop, when I open it's config window it's called "Zone Labs Integrity Desktop". When I click on the help/about link it sends me here http://www.zonelabs.com/store/content/company/corpsales/zapidOverview.jsp Mike - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: session data in Tomcat 5
> > Ah Ben, I don't know if you have kids or not. But y'know how a kid can > kinda look at the floor and shuffle their feet when caught doing > something stupid. Well, keep that in mind as you read what I figured > out... Believe me, you've nothing to feel stupid about. We've all been there. One thing to bear in mind, and I've had to tell myself this at least a dozen times over the last year, is that there are thousands of people developing commercial applications with Tomcat right now. If something fundamental, like session handling, were ever to stop working, there would be hundreds of posts to this list, all of them complaining about the same thing. Within a day, there would be a fix for it. Over the next few days, you would see hundreds more complaining about the same bug accompanied by hundreds of posts from the likes of Yoav Shapira, Tim Funk, Philip Hanik, (and several others) answering the same question over and over again, telling people exactly what version to download to fix it. If you don't see that scenerio on this list, keep looking at your own setup. I'm glad it's working for you. -Ben PS: Did the put the Zone Labs product on the server, or just on your desktop? On Saturday 22 May 2004 01:31 pm, you wrote: > Ben Souther wrote: > >I just dropped your JSPs in a box running win2k server and tomcat 5.0.24. > > > >They run fine, same session. Once the strings are created, they stay > > created, no nulls. > > > >I'm hitting from a linux box using Mozilla, but I also tried from MSIE on > > the machine that's hosting your JSPs. > > > >All looks good. > > > > > >For kicks, try doing this: > >In MSIE, click Internet Options -> Privacy (tab) -> Advanced (button) > >Then check the "Always Allow Session Cookies" checkbox. > >Let me know if that fixes it. > > > >-good luck > > Ah Ben, I don't know if you have kids or not. But y'know how a kid can > kinda look at the floor and shuffle their feet when caught doing > something stupid. Well, keep that in mind as you read what I figured > out... > > Recall that I first installed the latest non-alpha code 5.0.24 but > without the fix. I think that is key to what I was seeing. Also I am > running this Zone Labs Integrity Desktop thingie on Win2K that our IT > dep't thinks will keeps us dumb users safe. So, I deploy to the local > TC5 instance and see some odd problems that I've tried to nail down. > Seemed like session data was not being kept indicating a new session on > each request -- kinda like cookies were blocked, h. Investigation > of both the IE & Mozilla browsers did not indicate that session cookies > should be blocked, in addition the Zone labs thing is set to allow > session cookies but block persistent and 3rd party cookies. Should be > fine you'd think. So for the rest of my struggles I ignored the cookies > settings. > > In part of the struggles I installed the 5.0.25-alpha version of TC5. > > Then in the end I allowed all cookies to be passed, actually turned of > all security junk in the browsers and the zone labs thing, deleted all > cached pages & cookies, etc. Then it worked! I then gradually turned > everything back up, and it still works, woohoo! > > What I don't understand is why it (5.0.24) seemed to be failing locally > but ran OK from the Linux box. BTW, the FC1 box is now at the > 5.0.25-alpha version and seems to be just peachy. > > S, I think it is possible that my local deployment woes stemmed from > some strange cookie that 5.0.24 inserted? Could that be true though I > must admit that I read but don't wholly understand the implications of > defect. > > In any case I'm tickled that it's working and I'm off to solve some of > my 'real' runtime woes in our product (which TC has already pointed out > at least one). > > Many, many thanks to you Ben and others on the mailing list for their > patience and assistance. I truly do appreciate your interest and help > with this problem. > > Kind regards, > > Mike > > > - > 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 data in Tomcat 5
Ben Souther wrote: I just dropped your JSPs in a box running win2k server and tomcat 5.0.24. They run fine, same session. Once the strings are created, they stay created, no nulls. I'm hitting from a linux box using Mozilla, but I also tried from MSIE on the machine that's hosting your JSPs. All looks good. For kicks, try doing this: In MSIE, click Internet Options -> Privacy (tab) -> Advanced (button) Then check the "Always Allow Session Cookies" checkbox. Let me know if that fixes it. -good luck Ah Ben, I don't know if you have kids or not. But y'know how a kid can kinda look at the floor and shuffle their feet when caught doing something stupid. Well, keep that in mind as you read what I figured out... Recall that I first installed the latest non-alpha code 5.0.24 but without the fix. I think that is key to what I was seeing. Also I am running this Zone Labs Integrity Desktop thingie on Win2K that our IT dep't thinks will keeps us dumb users safe. So, I deploy to the local TC5 instance and see some odd problems that I've tried to nail down. Seemed like session data was not being kept indicating a new session on each request -- kinda like cookies were blocked, h. Investigation of both the IE & Mozilla browsers did not indicate that session cookies should be blocked, in addition the Zone labs thing is set to allow session cookies but block persistent and 3rd party cookies. Should be fine you'd think. So for the rest of my struggles I ignored the cookies settings. In part of the struggles I installed the 5.0.25-alpha version of TC5. Then in the end I allowed all cookies to be passed, actually turned of all security junk in the browsers and the zone labs thing, deleted all cached pages & cookies, etc. Then it worked! I then gradually turned everything back up, and it still works, woohoo! What I don't understand is why it (5.0.24) seemed to be failing locally but ran OK from the Linux box. BTW, the FC1 box is now at the 5.0.25-alpha version and seems to be just peachy. S, I think it is possible that my local deployment woes stemmed from some strange cookie that 5.0.24 inserted? Could that be true though I must admit that I read but don't wholly understand the implications of defect. In any case I'm tickled that it's working and I'm off to solve some of my 'real' runtime woes in our product (which TC has already pointed out at least one). Many, many thanks to you Ben and others on the mailing list for their patience and assistance. I truly do appreciate your interest and help with this problem. Kind regards, Mike - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: session data in Tomcat 5
Jacob Kjome wrote: Well, it works for me on Win2k with Tomcat-5.0.25. Same session every post. You don't have sessions turned off in web.xml by setting the session-timeout to 0 or -1 (can't remember which one, if any, disables sessions) by chance, do you? You might also check for virus or firewall softwared/hardware on your machine. That stuff can mess things up pretty badly. Jake Hi Jake, In general I don't mess with the web.xml that WDSC has produced, in this case it only basically contains the welcome page stuff. Ahhh, yes, software firewall, see my reply to Ben... Mike - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: session data in Tomcat 5
I just dropped your JSPs in a box running win2k server and tomcat 5.0.24. They run fine, same session. Once the strings are created, they stay created, no nulls. I'm hitting from a linux box using Mozilla, but I also tried from MSIE on the machine that's hosting your JSPs. All looks good. For kicks, try doing this: In MSIE, click Internet Options -> Privacy (tab) -> Advanced (button) Then check the "Always Allow Session Cookies" checkbox. Let me know if that fixes it. -good luck On Friday 21 May 2004 10:36 am, M.Hockings wrote: > Certainly ! They are attached (please don't laugh at them tooo much ) > > BTW, I'm finding that my test server on FC1 (Tomcat 5.0.24) is working > quite well, fast response, can deploy, undeploy reliably and sessions > seem to work as expected. On Win2K however the 5.0.25 version is > considerably slower, often has to be re-started to get a successful > deploy and every touch is a new session. This is as configured by the > installer (I have not changed any of the config files other than setting > up a manager id/pwd) and the only change on install was to modify the > install directory from c:\... to d:\... In the past I've had Tomcat 4.0 > & 4.1 working solidly on Win2K even jk'd to Apache.I must admit that > I'm not a Tomcat expert, our main deployment platform is IBM's WAS but I > like to make sure that our product runs on Tomcat as some prefer a > different servlet container. > > I guess what I'm trying to say is I wonder if some of my woes have been > due to trying to use Tomcat 5 on my Win2K laptop rather than a "real" > server box. > > Mike > > Ben Souther wrote: > >Could you just attach the src to the two JSPs? > > > >On Friday 21 May 2004 09:18 am, M.Hockings wrote: > >>Shapira, Yoav wrote: > >>>Hi, > >>>Oh, this reminds me to have a vote on the stability of 5.0.25! > >>> > >>>You never answered the key question of whether your session attributes > >>>are Serializable or not: that's a binary question, should be easy to > >>>determine ;) > >>> > >>>Yoav Shapira > >>>Millennium Research Informatics > >> > >>Hi ! > >> > >>Yes, sorry, I forgot. > >> > >>I think for the most part the answer is no, however for these apps I'm > >>not worried about maintaining data over a shutdown-startup of the server > >>nor am I running in a cluster. The interesting thing is that on Windows > >>(Win2K to be exact) every hit to Tomcat seems to start a new session! > >> > >>I'm making a set of tests that will eventually work up to the actions > >>that the application does to maintain session data. And, yes, I will be > >>making the session objects serializable just to avoid future problems... > >> > >>For your enjoyment here is the same test app on two machines, my Win2K > >>laptop and a Linux (Fedora Core 1) server. On Windows it is > >>5.0.25-alpha (previously 5.0.24) and on Linux it is 5.0.24 > >>(out-of-the-box with no patches applied). I _think_ I have the external > >>url correct. > >> > >>Linux http://ontarioshoots.ath.cx:8080/TC5test/ > >>Windows http://ontarioshoots.ath.cx:8088/TC5test/ > >> > >>If you would like the .war file that it is deployed from just let me > >>know... > >> > >>Mike > >> > >>- > >>To unsubscribe, e-mail: [EMAIL PROTECTED] > >>For additional commands, e-mail: [EMAIL PROTECTED] -- Ben Souther F.W. Davison & Company, Inc. This e-mail message, and any accompanying documents, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure, distribution or copying is prohibited. If you are not the intended recipient, please contact our office by email or by telephone at (508) 747-7261 and immediately destroy all copies of the original message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: session data in Tomcat 5
Well, it works for me on Win2k with Tomcat-5.0.25. Same session every post. You don't have sessions turned off in web.xml by setting the session-timeout to 0 or -1 (can't remember which one, if any, disables sessions) by chance, do you? You might also check for virus or firewall softwared/hardware on your machine. That stuff can mess things up pretty badly. Jake Quoting "M.Hockings" <[EMAIL PROTECTED]>: > Certainly ! They are attached (please don't laugh at them tooo much ) > > BTW, I'm finding that my test server on FC1 (Tomcat 5.0.24) is working > quite well, fast response, can deploy, undeploy reliably and sessions > seem to work as expected. On Win2K however the 5.0.25 version is > considerably slower, often has to be re-started to get a successful > deploy and every touch is a new session. This is as configured by the > installer (I have not changed any of the config files other than setting > up a manager id/pwd) and the only change on install was to modify the > install directory from c:\... to d:\... In the past I've had Tomcat 4.0 > & 4.1 working solidly on Win2K even jk'd to Apache.I must admit that > I'm not a Tomcat expert, our main deployment platform is IBM's WAS but I > like to make sure that our product runs on Tomcat as some prefer a > different servlet container. > > I guess what I'm trying to say is I wonder if some of my woes have been > due to trying to use Tomcat 5 on my Win2K laptop rather than a "real" > server box. > > Mike > > > > Ben Souther wrote: > > >Could you just attach the src to the two JSPs? > > > > > >On Friday 21 May 2004 09:18 am, M.Hockings wrote: > > > > > >>Shapira, Yoav wrote: > >> > >> > >>>Hi, > >>>Oh, this reminds me to have a vote on the stability of 5.0.25! > >>> > >>>You never answered the key question of whether your session attributes > >>>are Serializable or not: that's a binary question, should be easy to > >>>determine ;) > >>> > >>>Yoav Shapira > >>>Millennium Research Informatics > >>> > >>> > >>Hi ! > >> > >>Yes, sorry, I forgot. > >> > >>I think for the most part the answer is no, however for these apps I'm > >>not worried about maintaining data over a shutdown-startup of the server > >>nor am I running in a cluster. The interesting thing is that on Windows > >>(Win2K to be exact) every hit to Tomcat seems to start a new session! > >> > >>I'm making a set of tests that will eventually work up to the actions > >>that the application does to maintain session data. And, yes, I will be > >>making the session objects serializable just to avoid future problems... > >> > >>For your enjoyment here is the same test app on two machines, my Win2K > >>laptop and a Linux (Fedora Core 1) server. On Windows it is > >>5.0.25-alpha (previously 5.0.24) and on Linux it is 5.0.24 > >>(out-of-the-box with no patches applied). I _think_ I have the external > >>url correct. > >> > >>Linux http://ontarioshoots.ath.cx:8080/TC5test/ > >>Windows http://ontarioshoots.ath.cx:8088/TC5test/ > >> > >>If you would like the .war file that it is deployed from just let me > >>know... > >> > >>Mike > >> > >>- > >>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 data in Tomcat 5
Shapira, Yoav wrote: Hi, How does 5.0.25 run on FC1? Yoav Shapira Millennium Research Informatics Hi Yoav, No, not yet as the 5.0.24 seems to be working fine (worlds better than .24 or .25 on Win2K). If I get some free time I'll give it a whirl. Mike - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: session data in Tomcat 5
Hi, How does 5.0.25 run on FC1? Yoav Shapira Millennium Research Informatics >-Original Message- >From: M.Hockings [mailto:[EMAIL PROTECTED] >Sent: Friday, May 21, 2004 10:37 AM >To: Tomcat Users List >Subject: Re: session data in Tomcat 5 > >Certainly ! They are attached (please don't laugh at them tooo much ) > >BTW, I'm finding that my test server on FC1 (Tomcat 5.0.24) is working >quite well, fast response, can deploy, undeploy reliably and sessions >seem to work as expected. On Win2K however the 5.0.25 version is >considerably slower, often has to be re-started to get a successful >deploy and every touch is a new session. This is as configured by the >installer (I have not changed any of the config files other than setting >up a manager id/pwd) and the only change on install was to modify the >install directory from c:\... to d:\... In the past I've had Tomcat 4.0 >& 4.1 working solidly on Win2K even jk'd to Apache.I must admit that >I'm not a Tomcat expert, our main deployment platform is IBM's WAS but I >like to make sure that our product runs on Tomcat as some prefer a >different servlet container. > >I guess what I'm trying to say is I wonder if some of my woes have been >due to trying to use Tomcat 5 on my Win2K laptop rather than a "real" >server box. > >Mike > > > >Ben Souther wrote: > >>Could you just attach the src to the two JSPs? >> >> >>On Friday 21 May 2004 09:18 am, M.Hockings wrote: >> >> >>>Shapira, Yoav wrote: >>> >>> >>>>Hi, >>>>Oh, this reminds me to have a vote on the stability of 5.0.25! >>>> >>>>You never answered the key question of whether your session attributes >>>>are Serializable or not: that's a binary question, should be easy to >>>>determine ;) >>>> >>>>Yoav Shapira >>>>Millennium Research Informatics >>>> >>>> >>>Hi ! >>> >>>Yes, sorry, I forgot. >>> >>>I think for the most part the answer is no, however for these apps I'm >>>not worried about maintaining data over a shutdown-startup of the server >>>nor am I running in a cluster. The interesting thing is that on Windows >>>(Win2K to be exact) every hit to Tomcat seems to start a new session! >>> >>>I'm making a set of tests that will eventually work up to the actions >>>that the application does to maintain session data. And, yes, I will be >>>making the session objects serializable just to avoid future problems... >>> >>>For your enjoyment here is the same test app on two machines, my Win2K >>>laptop and a Linux (Fedora Core 1) server. On Windows it is >>>5.0.25-alpha (previously 5.0.24) and on Linux it is 5.0.24 >>>(out-of-the-box with no patches applied). I _think_ I have the external >>>url correct. >>> >>>Linux http://ontarioshoots.ath.cx:8080/TC5test/ >>>Windows http://ontarioshoots.ath.cx:8088/TC5test/ >>> >>>If you would like the .war file that it is deployed from just let me >>>know... >>> >>>Mike >>> >>>- >>>To unsubscribe, e-mail: [EMAIL PROTECTED] >>>For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >> >> >> 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]
Re: session data in Tomcat 5
Certainly ! They are attached (please don't laugh at them tooo much ) BTW, I'm finding that my test server on FC1 (Tomcat 5.0.24) is working quite well, fast response, can deploy, undeploy reliably and sessions seem to work as expected. On Win2K however the 5.0.25 version is considerably slower, often has to be re-started to get a successful deploy and every touch is a new session. This is as configured by the installer (I have not changed any of the config files other than setting up a manager id/pwd) and the only change on install was to modify the install directory from c:\... to d:\... In the past I've had Tomcat 4.0 & 4.1 working solidly on Win2K even jk'd to Apache.I must admit that I'm not a Tomcat expert, our main deployment platform is IBM's WAS but I like to make sure that our product runs on Tomcat as some prefer a different servlet container. I guess what I'm trying to say is I wonder if some of my woes have been due to trying to use Tomcat 5 on my Win2K laptop rather than a "real" server box. Mike Ben Souther wrote: Could you just attach the src to the two JSPs? On Friday 21 May 2004 09:18 am, M.Hockings wrote: Shapira, Yoav wrote: Hi, Oh, this reminds me to have a vote on the stability of 5.0.25! You never answered the key question of whether your session attributes are Serializable or not: that's a binary question, should be easy to determine ;) Yoav Shapira Millennium Research Informatics Hi ! Yes, sorry, I forgot. I think for the most part the answer is no, however for these apps I'm not worried about maintaining data over a shutdown-startup of the server nor am I running in a cluster. The interesting thing is that on Windows (Win2K to be exact) every hit to Tomcat seems to start a new session! I'm making a set of tests that will eventually work up to the actions that the application does to maintain session data. And, yes, I will be making the session objects serializable just to avoid future problems... For your enjoyment here is the same test app on two machines, my Win2K laptop and a Linux (Fedora Core 1) server. On Windows it is 5.0.25-alpha (previously 5.0.24) and on Linux it is 5.0.24 (out-of-the-box with no patches applied). I _think_ I have the external url correct. Linux http://ontarioshoots.ath.cx:8080/TC5test/ Windows http://ontarioshoots.ath.cx:8088/TC5test/ If you would like the .war file that it is deployed from just let me know... Mike - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> first.jsp First Session ID=<%=session.getId()%> test = <%=session.getAttribute("test")%> test2 = <%=session.getAttribute("test2")%> <% session.setAttribute("test2","test2"); %> test2 confirm = <%=session.getAttribute("test2")%> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> second.jsp Second Session ID=<%=session.getId()%> test = <%=session.getAttribute("test")%> test2 = <%=session.getAttribute("test2")%> <% session.setAttribute("test","test"); %> test confirm = <%=session.getAttribute("test")%> <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" %> First Test First Test This test will just test the passing of a couple of strings between two jsp's by saving the strings as attributes in the session. If this test is successful the session id should be unchanging and the test and test2 variables should be equal to test and test2. In the failing case the variables will remain as null and the session id will change with each submit. Click [here] to start - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: session data in Tomcat 5
Could you just attach the src to the two JSPs? On Friday 21 May 2004 09:18 am, M.Hockings wrote: > Shapira, Yoav wrote: > >Hi, > >Oh, this reminds me to have a vote on the stability of 5.0.25! > > > >You never answered the key question of whether your session attributes > >are Serializable or not: that's a binary question, should be easy to > >determine ;) > > > >Yoav Shapira > >Millennium Research Informatics > > Hi ! > > Yes, sorry, I forgot. > > I think for the most part the answer is no, however for these apps I'm > not worried about maintaining data over a shutdown-startup of the server > nor am I running in a cluster. The interesting thing is that on Windows > (Win2K to be exact) every hit to Tomcat seems to start a new session! > > I'm making a set of tests that will eventually work up to the actions > that the application does to maintain session data. And, yes, I will be > making the session objects serializable just to avoid future problems... > > For your enjoyment here is the same test app on two machines, my Win2K > laptop and a Linux (Fedora Core 1) server. On Windows it is > 5.0.25-alpha (previously 5.0.24) and on Linux it is 5.0.24 > (out-of-the-box with no patches applied). I _think_ I have the external > url correct. > > Linux http://ontarioshoots.ath.cx:8080/TC5test/ > Windows http://ontarioshoots.ath.cx:8088/TC5test/ > > If you would like the .war file that it is deployed from just let me > know... > > Mike > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- Ben Souther F.W. Davison & Company, Inc. This e-mail message, and any accompanying documents, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure, distribution or copying is prohibited. If you are not the intended recipient, please contact our office by email or by telephone at (508) 747-7261 and immediately destroy all copies of the original message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: session data in Tomcat 5
Shapira, Yoav wrote: Hi, Oh, this reminds me to have a vote on the stability of 5.0.25! You never answered the key question of whether your session attributes are Serializable or not: that's a binary question, should be easy to determine ;) Yoav Shapira Millennium Research Informatics Hi ! Yes, sorry, I forgot. I think for the most part the answer is no, however for these apps I'm not worried about maintaining data over a shutdown-startup of the server nor am I running in a cluster. The interesting thing is that on Windows (Win2K to be exact) every hit to Tomcat seems to start a new session! I'm making a set of tests that will eventually work up to the actions that the application does to maintain session data. And, yes, I will be making the session objects serializable just to avoid future problems... For your enjoyment here is the same test app on two machines, my Win2K laptop and a Linux (Fedora Core 1) server. On Windows it is 5.0.25-alpha (previously 5.0.24) and on Linux it is 5.0.24 (out-of-the-box with no patches applied). I _think_ I have the external url correct. Linux http://ontarioshoots.ath.cx:8080/TC5test/ Windows http://ontarioshoots.ath.cx:8088/TC5test/ If you would like the .war file that it is deployed from just let me know... Mike - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: session data in Tomcat 5
On Friday 21 May 2004 08:53 am, Shapira, Yoav wrote: > You never answered the key question of whether your session attributes > are Serializable or not: that's a binary question, should be easy to > determine ;) > He didn't answer it but he did mention that he wasn't concerned with maintaining state across server restsarts: >For the most part I'm only concerned with session stuff while a user is >busy editing -- it doesn't have to survive stop/start at all. I don't think his problem has to do with whether or not the objects are serializable. > Yoav Shapira > Millennium Research Informatics > > >-Original Message- > > From: Ben Souther [mailto:[EMAIL PROTECTED] > > >Sent: Friday, May 21, 2004 7:24 AM > >To: Tomcat Users List > >Subject: Re: session data in Tomcat 5 > > > >Mike, > >If you have a small, reproducable test case, send it up. I'd like to > > take > > >a > >look at it. > > > >On Friday 21 May 2004 01:10 am, you wrote: > >> Jacob Kjome wrote: > >> > I didn't see the earlier posts, but are you using Tomcat-5.0.24? > >> > There's a bug related to session cookies which requires a hotfix. > >> > However, I'd just install 5.0.25 which has the fix, plus a few > >> > others. Also note that Tomcat-5.0.24+ is very strict about objects > > in > > >> > the session being serializable (where 5.0.19 was less so). Upon > >> > application shutdown, non-serializable attributes will be removed > > so > > >> > that upon restart, the non-serializable attributes won't exist in > > the > > >> > session. Not sure if that is your problem here, but it's a good > > thing > > >> > to note. > >> > > >> > http://archive.apache.org/dist/jakarta/tomcat-5/v5.0.25-alpha/ > >> > > >> > Jake > >> > >> Well, yes and no. That is, on the remote server it is 5.0.19 but > >> locally on my laptop (Win2K) and on a Linux box (FC1) I downloaded > > and > > >> installed 5.0.24. I wrote a pair of simple test jsp's and the > > version > > >> on the Win2K machine certainly has problems as the session is > > different > > >> on every submit. The remote server and the Linux box seem better. > >> After reading your note I uninstalled the 5.0.24 version then > > downloaded > > >> and installed the 5.0.25-alpha version (the alpha part scared me > > which > > >> is why I went with the 5.0.24 before). Interestingly enough it also > >> seems to exhibit the same behaviour (new session on every submit). I > >> guess this means that all the straining and heaving to get things to > >> work on a local Tomcat 5 server before deploying them remotely was a > >> wasted day. > >> > >> For those interested, my test consisted of two simple jsp's like the > >> following one. This is second.jsp the other being first.jsp. In the > >> other jsp test is test2 and test2 is test. > >> > >> <%@ page language="java" contentType="text/html; charset=UTF-8" > >> pageEncoding="UTF-8" %> > >> > >> > >> > >> second.jsp > >> > >> > >> Second > >> Session ID=<%=session.getId()%> > >> test = <%=session.getAttribute("test")%> > >> test2 = <%=session.getAttribute("test2")%> > >> > >> > >> > >> > >> <% > >> session.setAttribute("test","test"); > >> %> > >> test confirm = <%=session.getAttribute("test")%> > >> > >> > >> > >> For the most part I'm only concerned with session stuff while a user > > is > > >> busy editing -- it doesn't have to survive stop/start at all. My > >> "feeling" right now (FWIF) after repeated deploy/undeploy on the > > three > > >> installs of Tomcat is that Tomcat 5 is certainly is not as solidly > >> stable as Tomcat 4.1. > >> > >> Mike > >> > >> - > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > > > >- > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional
RE: session data in Tomcat 5
Hi, Oh, this reminds me to have a vote on the stability of 5.0.25! You never answered the key question of whether your session attributes are Serializable or not: that's a binary question, should be easy to determine ;) Yoav Shapira Millennium Research Informatics >-Original Message- >From: Ben Souther [mailto:[EMAIL PROTECTED] >Sent: Friday, May 21, 2004 7:24 AM >To: Tomcat Users List >Subject: Re: session data in Tomcat 5 > >Mike, >If you have a small, reproducable test case, send it up. I'd like to take >a >look at it. > > >On Friday 21 May 2004 01:10 am, you wrote: >> Jacob Kjome wrote: >> > I didn't see the earlier posts, but are you using Tomcat-5.0.24? >> > There's a bug related to session cookies which requires a hotfix. >> > However, I'd just install 5.0.25 which has the fix, plus a few >> > others. Also note that Tomcat-5.0.24+ is very strict about objects in >> > the session being serializable (where 5.0.19 was less so). Upon >> > application shutdown, non-serializable attributes will be removed so >> > that upon restart, the non-serializable attributes won't exist in the >> > session. Not sure if that is your problem here, but it's a good thing >> > to note. >> > >> > http://archive.apache.org/dist/jakarta/tomcat-5/v5.0.25-alpha/ >> > >> > Jake >> >> Well, yes and no. That is, on the remote server it is 5.0.19 but >> locally on my laptop (Win2K) and on a Linux box (FC1) I downloaded and >> installed 5.0.24. I wrote a pair of simple test jsp's and the version >> on the Win2K machine certainly has problems as the session is different >> on every submit. The remote server and the Linux box seem better. >> After reading your note I uninstalled the 5.0.24 version then downloaded >> and installed the 5.0.25-alpha version (the alpha part scared me which >> is why I went with the 5.0.24 before). Interestingly enough it also >> seems to exhibit the same behaviour (new session on every submit). I >> guess this means that all the straining and heaving to get things to >> work on a local Tomcat 5 server before deploying them remotely was a >> wasted day. >> >> For those interested, my test consisted of two simple jsp's like the >> following one. This is second.jsp the other being first.jsp. In the >> other jsp test is test2 and test2 is test. >> >> <%@ page language="java" contentType="text/html; charset=UTF-8" >> pageEncoding="UTF-8" %> >> >> >> >> second.jsp >> >> >> Second >> Session ID=<%=session.getId()%> >> test = <%=session.getAttribute("test")%> >> test2 = <%=session.getAttribute("test2")%> >> >> >> >> >> <% >> session.setAttribute("test","test"); >> %> >> test confirm = <%=session.getAttribute("test")%> >> >> >> >> For the most part I'm only concerned with session stuff while a user is >> busy editing -- it doesn't have to survive stop/start at all. My >> "feeling" right now (FWIF) after repeated deploy/undeploy on the three >> installs of Tomcat is that Tomcat 5 is certainly is not as solidly >> stable as Tomcat 4.1. >> >> Mike >> >> - >> 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] 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]
Re: session data in Tomcat 5
Mike, If you have a small, reproducable test case, send it up. I'd like to take a look at it. On Friday 21 May 2004 01:10 am, you wrote: > Jacob Kjome wrote: > > I didn't see the earlier posts, but are you using Tomcat-5.0.24? > > There's a bug related to session cookies which requires a hotfix. > > However, I'd just install 5.0.25 which has the fix, plus a few > > others. Also note that Tomcat-5.0.24+ is very strict about objects in > > the session being serializable (where 5.0.19 was less so). Upon > > application shutdown, non-serializable attributes will be removed so > > that upon restart, the non-serializable attributes won't exist in the > > session. Not sure if that is your problem here, but it's a good thing > > to note. > > > > http://archive.apache.org/dist/jakarta/tomcat-5/v5.0.25-alpha/ > > > > Jake > > Well, yes and no. That is, on the remote server it is 5.0.19 but > locally on my laptop (Win2K) and on a Linux box (FC1) I downloaded and > installed 5.0.24. I wrote a pair of simple test jsp's and the version > on the Win2K machine certainly has problems as the session is different > on every submit. The remote server and the Linux box seem better. > After reading your note I uninstalled the 5.0.24 version then downloaded > and installed the 5.0.25-alpha version (the alpha part scared me which > is why I went with the 5.0.24 before). Interestingly enough it also > seems to exhibit the same behaviour (new session on every submit). I > guess this means that all the straining and heaving to get things to > work on a local Tomcat 5 server before deploying them remotely was a > wasted day. > > For those interested, my test consisted of two simple jsp's like the > following one. This is second.jsp the other being first.jsp. In the > other jsp test is test2 and test2 is test. > > <%@ page language="java" contentType="text/html; charset=UTF-8" > pageEncoding="UTF-8" %> > > > > second.jsp > > > Second > Session ID=<%=session.getId()%> > test = <%=session.getAttribute("test")%> > test2 = <%=session.getAttribute("test2")%> > > > > > <% > session.setAttribute("test","test"); > %> > test confirm = <%=session.getAttribute("test")%> > > > > For the most part I'm only concerned with session stuff while a user is > busy editing -- it doesn't have to survive stop/start at all. My > "feeling" right now (FWIF) after repeated deploy/undeploy on the three > installs of Tomcat is that Tomcat 5 is certainly is not as solidly > stable as Tomcat 4.1. > > Mike > > - > 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 data in Tomcat 5
Jacob Kjome wrote: I didn't see the earlier posts, but are you using Tomcat-5.0.24? There's a bug related to session cookies which requires a hotfix. However, I'd just install 5.0.25 which has the fix, plus a few others. Also note that Tomcat-5.0.24+ is very strict about objects in the session being serializable (where 5.0.19 was less so). Upon application shutdown, non-serializable attributes will be removed so that upon restart, the non-serializable attributes won't exist in the session. Not sure if that is your problem here, but it's a good thing to note. http://archive.apache.org/dist/jakarta/tomcat-5/v5.0.25-alpha/ Jake Well, yes and no. That is, on the remote server it is 5.0.19 but locally on my laptop (Win2K) and on a Linux box (FC1) I downloaded and installed 5.0.24. I wrote a pair of simple test jsp's and the version on the Win2K machine certainly has problems as the session is different on every submit. The remote server and the Linux box seem better. After reading your note I uninstalled the 5.0.24 version then downloaded and installed the 5.0.25-alpha version (the alpha part scared me which is why I went with the 5.0.24 before). Interestingly enough it also seems to exhibit the same behaviour (new session on every submit). I guess this means that all the straining and heaving to get things to work on a local Tomcat 5 server before deploying them remotely was a wasted day. For those interested, my test consisted of two simple jsp's like the following one. This is second.jsp the other being first.jsp. In the other jsp test is test2 and test2 is test. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> second.jsp Second Session ID=<%=session.getId()%> test = <%=session.getAttribute("test")%> test2 = <%=session.getAttribute("test2")%> <% session.setAttribute("test","test"); %> test confirm = <%=session.getAttribute("test")%> For the most part I'm only concerned with session stuff while a user is busy editing -- it doesn't have to survive stop/start at all. My "feeling" right now (FWIF) after repeated deploy/undeploy on the three installs of Tomcat is that Tomcat 5 is certainly is not as solidly stable as Tomcat 4.1. Mike - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: session data in Tomcat 5
At 04:53 PM 5/20/2004 -0400, you wrote: Ben Souther wrote: On Thursday 20 May 2004 10:15 am, Shapira, Yoav wrote: in starting jsp 1 session.setAttribute("ml",ml); in target jsp 2 MyPackage.MyClass ml = (MyPackage.MyClass)session.getAttribute("ml"); System.out.println("ml = "+ml); then in the log I see... ml = null You didn't include it in your code snippet so I have to ask: are you sure that the "ml" object wasn't null before you called setAttribute? Also, are you testing this with the same browser that you were using with the 4x version of Tomcat (that was working)? I'm asking because this looks like a case of MSIE not storing session cookies properly. (IOW: every hit to the server is generating it's own session). Yup the original is non-null. What I did to confirm this is that after the setAttribute I did a getAttribute into another reference and did a System.out on that to be sure that it actually got put in the session. Today I created a new project in WDSC 5.1.2 (the latest) imported all the files and cleaned up every last validation error. It works just fine in the WAS 5.0 and 5.1 test environments (only J2EE 1.3 though). Deploying to my test Tomcat 5 on Win2K shows the same problem as before. I'm using the same browser and machine as was working with Tomcat 4. I did wonder if cookies were being dropped (I have to run this Integrity Client thing on Win2K that does block some stuff) so I've even tried running with Mozilla from Linux and the symptoms are identical. So it still seems to be something related to this specific webapp code but it hasn't dawned on me what yet. Tomorrow I plan on writing a simple pair of jsps, one to display the session id and all the session data and the other that will display the session id, put an element in the session and submit to the first one. That will more or less simulate the function of the real app that seems to be failing. Once I figure this one out I'm sure it will be a "duh" kinda feeling... I didn't see the earlier posts, but are you using Tomcat-5.0.24? There's a bug related to session cookies which requires a hotfix. However, I'd just install 5.0.25 which has the fix, plus a few others. Also note that Tomcat-5.0.24+ is very strict about objects in the session being serializable (where 5.0.19 was less so). Upon application shutdown, non-serializable attributes will be removed so that upon restart, the non-serializable attributes won't exist in the session. Not sure if that is your problem here, but it's a good thing to note. http://archive.apache.org/dist/jakarta/tomcat-5/v5.0.25-alpha/ Jake Mike - 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 data in Tomcat 5
Ben Souther wrote: On Thursday 20 May 2004 10:15 am, Shapira, Yoav wrote: in starting jsp 1 session.setAttribute("ml",ml); in target jsp 2 MyPackage.MyClass ml = (MyPackage.MyClass)session.getAttribute("ml"); System.out.println("ml = "+ml); then in the log I see... ml = null You didn't include it in your code snippet so I have to ask: are you sure that the "ml" object wasn't null before you called setAttribute? Also, are you testing this with the same browser that you were using with the 4x version of Tomcat (that was working)? I'm asking because this looks like a case of MSIE not storing session cookies properly. (IOW: every hit to the server is generating it's own session). Yup the original is non-null. What I did to confirm this is that after the setAttribute I did a getAttribute into another reference and did a System.out on that to be sure that it actually got put in the session. Today I created a new project in WDSC 5.1.2 (the latest) imported all the files and cleaned up every last validation error. It works just fine in the WAS 5.0 and 5.1 test environments (only J2EE 1.3 though). Deploying to my test Tomcat 5 on Win2K shows the same problem as before. I'm using the same browser and machine as was working with Tomcat 4. I did wonder if cookies were being dropped (I have to run this Integrity Client thing on Win2K that does block some stuff) so I've even tried running with Mozilla from Linux and the symptoms are identical. So it still seems to be something related to this specific webapp code but it hasn't dawned on me what yet. Tomorrow I plan on writing a simple pair of jsps, one to display the session id and all the session data and the other that will display the session id, put an element in the session and submit to the first one. That will more or less simulate the function of the real app that seems to be failing. Once I figure this one out I'm sure it will be a "duh" kinda feeling... Mike - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: session data in Tomcat 5
setAttribute("ml",null); is the same as removeAttribute("ml"); just an fyi :) - Original Message - From: "Ben Souther" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Thursday, May 20, 2004 10:24 AM Subject: Re: session data in Tomcat 5 On Thursday 20 May 2004 10:15 am, Shapira, Yoav wrote: > >in starting jsp 1 > > session.setAttribute("ml",ml); > > > > > >in target jsp 2 > > MyPackage.MyClass ml = (MyPackage.MyClass)session.getAttribute("ml"); > > System.out.println("ml = "+ml); > > > > > >then in the log I see... > > > > > > ml = null You didn't include it in your code snippet so I have to ask: are you sure that the "ml" object wasn't null before you called setAttribute? Also, are you testing this with the same browser that you were using with the 4x version of Tomcat (that was working)? I'm asking because this looks like a case of MSIE not storing session cookies properly. (IOW: every hit to the server is generating it's own session). - 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 data in Tomcat 5
On Thursday 20 May 2004 10:15 am, Shapira, Yoav wrote: > >in starting jsp 1 > > session.setAttribute("ml",ml); > > > > > >in target jsp 2 > > MyPackage.MyClass ml = (MyPackage.MyClass)session.getAttribute("ml"); > > System.out.println("ml = "+ml); > > > > > >then in the log I see... > > > > > > ml = null You didn't include it in your code snippet so I have to ask: are you sure that the "ml" object wasn't null before you called setAttribute? Also, are you testing this with the same browser that you were using with the 4x version of Tomcat (that was working)? I'm asking because this looks like a case of MSIE not storing session cookies properly. (IOW: every hit to the server is generating it's own session). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: session data in Tomcat 5
Shapira, Yoav wrote: Hi, Is your attribute Serializable? That's a big deal ;) There's no limit imposed by Tomcat on session attribute size. Yoav Shapira Millennium Research Informatics Hmm, interesting thought Yoav. It is a class derived from a properties file but I'm not sure if the derived class itself is serializable.I guess I'd only considered that important when dealing with policy redirectors & clusters in a larger environment. Is Tomcat 5 requiring/enforcing this? When I look at the javadoc for setAttribute(String key, Object value) it does not indicate that the value needs to be serializable. However, it would not hurt, I'll give it a try. Kind regards, Mike - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: session data in Tomcat 5
Hi, Is your attribute Serializable? That's a big deal ;) There's no limit imposed by Tomcat on session attribute size. Yoav Shapira Millennium Research Informatics >-Original Message- >From: M.Hockings [mailto:[EMAIL PROTECTED] >Sent: Thursday, May 20, 2004 9:20 AM >To: Tomcat Users List >Subject: Re: session data in Tomcat 5 > >Yes, good point, gives you an idea how long some of this stuff has been >deployed :-) > >However, even changing to setAttribute() and getAttribute() does not >seem to solve the problem. This should be trivial I would think but it >seems to be beyond me at the moment. > >Is there maybe some (small) limit to the size of session attributes in >Tomcat 5? In this case ml is a populated properties file. Though in >this case it contains only about 5 or 6 entries. > >in starting jsp 1 > session.setAttribute("ml",ml); > >in target jsp 2 > MyPackage.MyClass ml = (MyPackage.MyClass)session.getAttribute("ml"); > System.out.println("ml = "+ml); > >then in the log I see... > > ml = null > > >Mike > >Ben Souther wrote: > >>putValue and getValue have been deprecated. >>See: >http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpSession.ht ml >> >>Use setAttribute and getAttribute instead. >> >> >> >>On Thursday 20 May 2004 08:41 am, M.Hockings wrote: >> >> >>>My ISP has just upgraded the servlet container from Tomcat 4.1 (which >>>was working just fine BTW) to Tomcat 5.0 (5.0.19 I believe). I have had >>>several webapps successfully deployed under Tomcat 4.1 that were causing >>>Tomcat 5 not to start. For the most part I think I have fixed all of >>>these problems (largely a miss-configuration of log4j) but still one >>>major problem remains. >>> >>>The remaining problem is that session data does not seem to be preserved >>>from page to page. That is, if on a simple .jsp I have something like: >>> >>> myPackage.myClass ml = new myPackage.myClass(); >>> session.putValue("ml",ml); >>> >>>Then do a form-based submit to a second jsp which contains: >>> >>> >>> >>>Then I get an error saying >>> >>> javax.servlet.ServletException: bean ml not found within scope >>> >>>If I try to manually extract the ml attribute from the session in the >>>second .jsp I find that it is not set. >>> >>>I have done some Googling about this problem but I don't see anything >>>that would help -- the hits were largely about clustering. In my case I >>>do not have access to the Tomcat config (server.xml) and have to live >>>with how things are configured at the ISP. >>> >>>Has anyone else experienced this problem? If so, is there a solution? >>> >>>To test this I have also installed Tomcat 5.0.24 on my laptop (Win2K) >>>where it exhibits the same problem and on a Linux (Fedora Core 1) >>>machine where it does not exhibit this problem. Both are running on >>>Sun's 1.4 JDK with the stock (as shipped) server.xml. >>> >>>The ISP which has been very responsive in the past is being not all that >>>helpful and they had the active component of the sites down for the best >>>part of a week! >>> >>>Mike >>> >>> >>> >>>- >>>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] 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]
Re: session data in Tomcat 5
Yes, good point, gives you an idea how long some of this stuff has been deployed :-) However, even changing to setAttribute() and getAttribute() does not seem to solve the problem. This should be trivial I would think but it seems to be beyond me at the moment. Is there maybe some (small) limit to the size of session attributes in Tomcat 5? In this case ml is a populated properties file. Though in this case it contains only about 5 or 6 entries. in starting jsp 1 session.setAttribute("ml",ml); in target jsp 2 MyPackage.MyClass ml = (MyPackage.MyClass)session.getAttribute("ml"); System.out.println("ml = "+ml); then in the log I see... ml = null Mike Ben Souther wrote: putValue and getValue have been deprecated. See: http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpSession.html Use setAttribute and getAttribute instead. On Thursday 20 May 2004 08:41 am, M.Hockings wrote: My ISP has just upgraded the servlet container from Tomcat 4.1 (which was working just fine BTW) to Tomcat 5.0 (5.0.19 I believe). I have had several webapps successfully deployed under Tomcat 4.1 that were causing Tomcat 5 not to start. For the most part I think I have fixed all of these problems (largely a miss-configuration of log4j) but still one major problem remains. The remaining problem is that session data does not seem to be preserved from page to page. That is, if on a simple .jsp I have something like: myPackage.myClass ml = new myPackage.myClass(); session.putValue("ml",ml); Then do a form-based submit to a second jsp which contains: Then I get an error saying javax.servlet.ServletException: bean ml not found within scope If I try to manually extract the ml attribute from the session in the second .jsp I find that it is not set. I have done some Googling about this problem but I don't see anything that would help -- the hits were largely about clustering. In my case I do not have access to the Tomcat config (server.xml) and have to live with how things are configured at the ISP. Has anyone else experienced this problem? If so, is there a solution? To test this I have also installed Tomcat 5.0.24 on my laptop (Win2K) where it exhibits the same problem and on a Linux (Fedora Core 1) machine where it does not exhibit this problem. Both are running on Sun's 1.4 JDK with the stock (as shipped) server.xml. The ISP which has been very responsive in the past is being not all that helpful and they had the active component of the sites down for the best part of a week! Mike - 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 data in Tomcat 5
QM wrote: On Thu, May 20, 2004 at 08:55:43AM -0400, Ben Souther wrote: : putValue and getValue have been deprecated. : See: : http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpSession.html : : Use setAttribute and getAttribute instead. Yes, did you rebuild your app when you upgraded? That would have caught the deprecation warning. I've included that, and other tips, in my (brief) 4.x -> 5.x upgrade guide: http://www.brandxdev.net/misc/tomcat_upgrade.site Ben: thanks for the putValue/getValue info, I'll include that as well. (It never bit me, because I never used them... ;) -QM To be honest the putValue/getValue has been deprecated for a while but continues to work so I've been too lazy to change it (why change what works). However changing to setAttribute/getAttribute seems to make no difference. All I'm trying to get functional at the moment is a set of 4 or 5 jsp's that bounce back and forth to allow people to update some properties files. If I can get that going then I'll move on to the Stuts based apps. The loose jsp's are just dropped into a pre-defined (by the ISP) webapp and are thus not truly built. The bigger apps are crafted using IBM's WDSCi for j2ee 1.3 and deployed via WAR files. Mike - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: session data in Tomcat 5
Hi, >> I've included that, and other tips, in my (brief) 4.x -> 5.x upgrade >> guide: >> http://www.brandxdev.net/misc/tomcat_upgrade.site Thanks for making that available, quite useful. Regards, Ryan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: session data in Tomcat 5
On Thu, May 20, 2004 at 08:55:43AM -0400, Ben Souther wrote: : putValue and getValue have been deprecated. : See: : http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpSession.html : : Use setAttribute and getAttribute instead. Yes, did you rebuild your app when you upgraded? That would have caught the deprecation warning. I've included that, and other tips, in my (brief) 4.x -> 5.x upgrade guide: http://www.brandxdev.net/misc/tomcat_upgrade.site Ben: thanks for the putValue/getValue info, I'll include that as well. (It never bit me, because I never used them... ;) -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: session data in Tomcat 5
putValue and getValue have been deprecated. See: http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpSession.html Use setAttribute and getAttribute instead. On Thursday 20 May 2004 08:41 am, M.Hockings wrote: > My ISP has just upgraded the servlet container from Tomcat 4.1 (which > was working just fine BTW) to Tomcat 5.0 (5.0.19 I believe). I have had > several webapps successfully deployed under Tomcat 4.1 that were causing > Tomcat 5 not to start. For the most part I think I have fixed all of > these problems (largely a miss-configuration of log4j) but still one > major problem remains. > > The remaining problem is that session data does not seem to be preserved > from page to page. That is, if on a simple .jsp I have something like: > >myPackage.myClass ml = new myPackage.myClass(); >session.putValue("ml",ml); > > Then do a form-based submit to a second jsp which contains: > > > > Then I get an error saying > >javax.servlet.ServletException: bean ml not found within scope > > If I try to manually extract the ml attribute from the session in the > second .jsp I find that it is not set. > > I have done some Googling about this problem but I don't see anything > that would help -- the hits were largely about clustering. In my case I > do not have access to the Tomcat config (server.xml) and have to live > with how things are configured at the ISP. > > Has anyone else experienced this problem? If so, is there a solution? > > To test this I have also installed Tomcat 5.0.24 on my laptop (Win2K) > where it exhibits the same problem and on a Linux (Fedora Core 1) > machine where it does not exhibit this problem. Both are running on > Sun's 1.4 JDK with the stock (as shipped) server.xml. > > The ISP which has been very responsive in the past is being not all that > helpful and they had the active component of the sites down for the best > part of a week! > > Mike > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- Ben Souther F.W. Davison & Company, Inc. This e-mail message, and any accompanying documents, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure, distribution or copying is prohibited. If you are not the intended recipient, please contact our office by email or by telephone at (508) 747-7261 and immediately destroy all copies of the original message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
session data in Tomcat 5
My ISP has just upgraded the servlet container from Tomcat 4.1 (which was working just fine BTW) to Tomcat 5.0 (5.0.19 I believe). I have had several webapps successfully deployed under Tomcat 4.1 that were causing Tomcat 5 not to start. For the most part I think I have fixed all of these problems (largely a miss-configuration of log4j) but still one major problem remains. The remaining problem is that session data does not seem to be preserved from page to page. That is, if on a simple .jsp I have something like: myPackage.myClass ml = new myPackage.myClass(); session.putValue("ml",ml); Then do a form-based submit to a second jsp which contains: Then I get an error saying javax.servlet.ServletException: bean ml not found within scope If I try to manually extract the ml attribute from the session in the second .jsp I find that it is not set. I have done some Googling about this problem but I don't see anything that would help -- the hits were largely about clustering. In my case I do not have access to the Tomcat config (server.xml) and have to live with how things are configured at the ISP. Has anyone else experienced this problem? If so, is there a solution? To test this I have also installed Tomcat 5.0.24 on my laptop (Win2K) where it exhibits the same problem and on a Linux (Fedora Core 1) machine where it does not exhibit this problem. Both are running on Sun's 1.4 JDK with the stock (as shipped) server.xml. The ISP which has been very responsive in the past is being not all that helpful and they had the active component of the sites down for the best part of a week! Mike - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]