Yea I hear you. I think If I just make sure that the root page is accessed with the proper URL, the rest of the relative URl's will resolve against that one, so maybe I don't have to hard code all of them. I'm still looking at the problem and maybe I'll find a more elegant solution, but the main thing is to get it to work in the enivronment that it is in.
--Monte Glenn Gardner On Fri, 1 Nov 2002, Adrian Janssen wrote: > what if they move your account to a different server causing your urls to > change to for e.g. www19.addr.com/~mgarde/somepage.html > > Now aint that gonna suck? > > > -----Original Message----- > > From: Monte Gardner [SMTP:[EMAIL PROTECTED]] > > Sent: 31 October 2002 03:57 > > To: [EMAIL PROTECTED] > > Subject: Re: session nonpersistence > > > > I think I may have found the problem. My webserver > > (I rent space on a commercial webserver) does a strange thing > > with regards to URL's: > > when I type in "www.addr.com/~mgardne/somepage.html" > > the browser actually gets redirected to > > "www22.addr.com/~mgardne/somepage.html" > > the www gets changed to www22. I think the servlet > > container was looking at some of my URL's and getting > > confused as to what was coming from where or something. > > Anyway, I hard coded some of my url's to absolute urls's > > with the http://www22.addr.com in them, and my sessions work now. > > not a pretty fix I know, but atleast I have it working. > > > > > > > > --Monte Glenn Gardner > > > > > > On Wed, 30 Oct 2002, Monte Gardner wrote: > > > > > soemoen else mentioned something about this. How do I tell if they > > > are in dfferenet web-apps. all pages are in the > > > same physical directory on the server. > > > > > > --Monte Glenn Gardner > > > > > > > > > On Wed, 30 Oct 2002, Nimmons, Buster wrote: > > > > > > > Also, if he jsp pages are in different web apps then each web > > application > > > > gets it's own session object and the objects are not replicated > > > > > > > > -----Original Message----- > > > > From: Shawn Bayern [mailto:bayern@;ESSENTIALLY.NET] > > > > Sent: Wednesday, October 30, 2002 9:32 AM > > > > To: [EMAIL PROTECTED] > > > > Subject: Re: session nonpersistence > > > > > > > > > > > > On Wed, 30 Oct 2002, Monte Gardner wrote: > > > > > > > > > I have a series of JSP pages that begin with a standard > > > > > userid/password login. The page that receives the login > > > > > request (shop.jsp) stores the id in the session like this > > > > > session.setAttribute("id",id); > > > > > when I print out > > > > > session.getAttribute("id"); > > > > > on the same page, it prints the id of the user. However, once the > > > > > user goes to the next page where he views products, and I try to > > > > > print out the user id with > > > > > session.getAttribute("id") or > > > > > request.getSession().getAttribute("id") > > > > > > > > > > It prints out null. I have a previous project on the same server in > > > > > which I did about the same thing, and it seems to work fine so I > > can't > > > > > see what I'm doing different between the two. What can cause the > > > > > session to forget stuff like this? > > > > > > > > Since HTTP is stateless, something actively needs to preserve the > > > > session; for instance, a session identifier can be conveyed by a > > > > cookie or as an addendum to the URL. > > > > > > > > It's possible that your browser isn't sending cookies back to the > > > > server; if it's not, and if you're not going out of your way to > > include > > > > the session identifier in links back to your application, then the > > server > > > > has no way of tying your multiple requests together into a session. > > > > > > > > To ensure you support sessions for browsers that aren't using cookies, > > > > make sure to encode the URL into all URLs that the application sends > > and > > > > that also point back to the application. The easiest way to ensure > > this > > > > in a JSP page is by printing all URLs through JSTL's <c:url> tag. > > > > > > > > -- > > > > Shawn Bayern > > > > "JSTL in Action" http://www.jstlbook.com > > > > > > > > > > ========================================================================== > > = > > > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > > > > JSP-INTEREST". > > > > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > > > > DIGEST". > > > > Some relevant FAQs on JSP/Servlets can be found at: > > > > > > > > http://archives.java.sun.com/jsp-interest.html > > > > http://java.sun.com/products/jsp/faq.html > > > > http://www.esperanto.org.nz/jsp/jspfaq.jsp > > > > http://www.jguru.com/faq/index.jsp > > > > http://www.jspinsider.com > > > > > > > > > > ========================================================================== > > = > > > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > > JSP-INTEREST". > > > > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > > DIGEST". > > > > Some relevant FAQs on JSP/Servlets can be found at: > > > > > > > > http://archives.java.sun.com/jsp-interest.html > > > > http://java.sun.com/products/jsp/faq.html > > > > http://www.esperanto.org.nz/jsp/jspfaq.jsp > > > > http://www.jguru.com/faq/index.jsp > > > > http://www.jspinsider.com > > > > > > > > > > > > ========================================================================== > > = > > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > > JSP-INTEREST". > > > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > > DIGEST". > > > Some relevant FAQs on JSP/Servlets can be found at: > > > > > > http://archives.java.sun.com/jsp-interest.html > > > http://java.sun.com/products/jsp/faq.html > > > http://www.esperanto.org.nz/jsp/jspfaq.jsp > > > http://www.jguru.com/faq/index.jsp > > > http://www.jspinsider.com > > > > > > > ========================================================================== > > = > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > > JSP-INTEREST". > > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > > DIGEST". > > Some relevant FAQs on JSP/Servlets can be found at: > > > > http://archives.java.sun.com/jsp-interest.html > > http://java.sun.com/products/jsp/faq.html > > http://www.esperanto.org.nz/jsp/jspfaq.jsp > > http://www.jguru.com/faq/index.jsp > > http://www.jspinsider.com > -- > > It is the strict policy of Truworths that its e-mail facility and all > e-mail communications emanating therefrom, should be utilised for > business purposes only and should conform to high professional and > business standards. Truworths has stipulated certain regulations in > terms whereof strict guidelines relating to the use and content of > e-mail communications are laid down. The use of the Truworths e-mail > facility is not permitted for the distribution of chain letters or > offensive mail of any nature whatsoever. Truworths hereby distances > itself from and accepts no liability in respect of the unauthorised > use of its e-mail facility or the sending of e-mail communications > for other than strictly business purposes. Truworths furthermore > disclaims liability for any unauthorised instruction for which > permission was not granted. Truworths Limited accepts no liability > for any consequences arising from or as a result of reliance on this > message unless it is in respect of bona fide Truworths business for > which proper authorisation has been granted. > > Any recipient of an unacceptable communication, a chain letter or > offensive material of any nature is requested to notify the Truworths > e-mail administrator ([EMAIL PROTECTED]) immediately in order that > appropriate action can be taken against the individual concerned. > > =========================================================================== > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://archives.java.sun.com/jsp-interest.html > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.jsp > http://www.jguru.com/faq/index.jsp > http://www.jspinsider.com > =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com