Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

jsp:forward and sessions without cookies don�t work together  RSS feed

 
Robert Jaeger
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
Both things in my webapplication (Sessions without cookies and the forward-action) work fine - seperately
I do this:
1) page.html: login-formular (form action= "checklogin.jsp")
2a) checklogin.jsp: checks user data and fills session with parameters, finally forwards to ...
2b) startpage.jsp
If cookies are dissabled tomcat/apache reports an error) the page "startpage.jsp;AR69D97987SA..." doesn�t exist. It works with activated cookies!
I cannot use the forward-directive, because my file-target has to be created dynamically.
Has anybody an idea?
Is there a better solution?
Greeting, Robert.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It look slike when cookies are turned off at the client that your server is automatically changing over to url-rewriting for encoding the session ID onto the url, but won't accept them back again.
It's probably a setting you have to turn on first. For example on the WebSphere AdminClient > nodes > (machine name) > (node name)
Select the 'Services' tab
Select the 'Session Manager Service'
Click 'Edit Properties'
Now you have the option of supporting sessions via cookies, url-rewriting, and also via SSL IDs.
Just for the record, HttpServletResponse.encodeURL( url ) will add the session to the url, but won't make the server understand it :roll:
http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpServletResponse.html
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!