File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HttpSessions in non-servlets

 
Shrikanth Goloposwami
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a HttpServlet controller that intercepts requests and maps those requests to Action objects. These Action objects are not HttpServlets; however, there is a need to retrieve the request sent by the HttpServlet controller, create a session and pass the request back to the controller for forwarding. The sessions are being created successfully in the Action objects, it just can't pass the session along to the HttpServlet controller. Is is possible to pass HttpSession objects from a non-servlet to a servlet via the request object?
Any thoughts?
 
JeanLouis Marechaux
Ranch Hand
Posts: 906
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can have the javax.servlet.http.HttpServletRequest request as argument of your action methods.(or in the constructor)
Then when you call the action method, you still have a request object you can work with and you can send back to a servlet later.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic