Wrox Home  
Search P2P Archive for: Go

  Return to Index  

servlets thread: URL Rewriting


Message #1 by leo_marri@y... on Wed, 4 Apr 2001 16:55:24
Thanks for the reply,
   I am using response.sendRedirect("/jsp/userinfo.jsp"); when I feel that 
I am not using session objects in that page.
   I use encodeURL for creating sessionID and RequestDispatcher for 
forwarding to the particular page with session values. 
   And coming to servlet path in form's action I am using relative path. 
So I have a question, where are u encoding URL for sessionId ? 
Thnx
-Narmada
> Just an idea -
> 
> try using the
> response.sendRedirect("/jsp/userinfo.jsp");
> 
> in place of creating the dispatcher and forwarding it.
> 
> I used this for a shopping cart and was able to
> maintain the session.
> 
> I'm not too familiar with the requestDispatcher
> forwarding, but I know I got some erroneous items in
> my shopping cart when I used that.
> 
> You might also check to make sure that when the
> servlet is called, you use the relative path.  I lost
> the session when I coded
> "http://ServerName/ServletName" in the form's action.
> 
> Also one last item to check is to make sure that if
> you reference a bean in the JSP usebean, that you
> specify that it has session="scope". (and that if you
> use a page declaration you don't have the session
> attribute set to false.
> 
> Hope this helps.
> 
> John

  Return to Index