File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes how to communicate between struts and session Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "how to communicate between struts and session " Watch "how to communicate between struts and session " New topic
Author

how to communicate between struts and session

Sean Li
Ranch Hand

Joined: Feb 27, 2002
Posts: 154
the perform method in class action look like this:
public ActionForward perform(ActionMapping mapping,Actionform form,HttpServletRequest req,HttpServletResponse res)
how can i transfer some variables to the session cause there's no session to set***(). and how can i transfer the session variables to the method because there's no session to get***().
is there any good solution to this question? i'm just not very familier with jsp.
thanks and waitting for experts' reply.
Buzz Andersen
Ranch Hand

Joined: Aug 28, 2001
Posts: 54
Sean,
The HttpServletRequest which is passed into your perform method has a method called getSession(), which returns the user's session.
See the JavaDoc...
Buzz
[ September 10, 2002: Message edited by: Buzz Andersen ]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: how to communicate between struts and session
 
Similar Threads
Qestions regarding sessions
How to perform DB operations during the session timeout in struts 1.3
in struts2 how can I use session variables
Thread Safety in Action Servlets
how to transfer Session object from jsp page to model class?