Rupp,Heiko wrote:

Hi,

does anyone have a simple example on how to use sessions
with JBoss and Jetty.
Yes, I know there are frameworks like struts and so.

What I try to do is

HttpSession session=request.getSession();
session.setAttribute("foo","bar");
encodedURL=response.encodeURL("/some/page.jsp");

But encodedURL is fixed at "/some/page.jsp", no matter what
I put in the session. So the next call to the servlet/jsp
(e.g. via a HTML-form) I get a new session and not the previous one.

Sessions will be tracked with cookies, not url rewriting, by default.

You need to confirm whether :

a) the cookie made it from Jetty back to your browser
b) the cookie is being sent in subsequent requests from browser to Jetty

Jules

P.S.

You can force tracking via url rewriting if this your preferred method - look in this FAQ:

http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jboss/contrib/jetty/FAQ?rev=HEAD&content-type=text/vnd.viewcvs-markup


Any hints?


Thanks in advance

Heiko







________________________________________________________________________ This email has been scanned for all viruses by the MessageLabs SkyScan service. For more information on a proactive anti-virus service working around the clock, around the globe, visit http://www.messagelabs.com ________________________________________________________________________


------------------------------------------------------- This SF.net email is sponsored by: The Definitive IT and Networking Event. Be There! NetWorld+Interop Las Vegas 2003 -- Register today! http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to