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 session problem with Action Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Application Frameworks » Struts
Reply Bookmark "session problem with Action " Watch "session problem with Action " New topic
Author

session problem with Action

Alvin chew
Ranch Hand

Joined: Jan 08, 2004
Posts: 834
hi, i have a page which contains some varabile which set by user and i save it into session as shown in following,



and this page also have one button, when user click button, it jump to action as show below :



the result will show null , i suppose to put session.getAttribute() for my action class, but it generate symbol can't resolved error...can anyone please suggest some solution to me ? thank you !!
[ October 04, 2004: Message edited by: Alvin chew ]
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4695

In Actions, you have to get a reference to it through the request parameter.

HttpSession session = request.getSession();


A good workman is known by his tools.
Alvin chew
Ranch Hand

Joined: Jan 08, 2004
Posts: 834
thanks, marc ...it work
 
 
subject: session problem with Action
 
Threads others viewed
Pop up calendar Problem
java coding problem ~ system.out.println
Google use Javascript or ajax on first page?
Struts - display data PROBLEM
Scripting with JSTL Core tags.
developer file tools