This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to communicate between struts and session  RSS feed

 
Sean Li
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!