aspose file tools
The moose likes Struts and the fly likes Request.setAttribute in Struts Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "Request.setAttribute in Struts" Watch "Request.setAttribute in Struts" New topic
Author

Request.setAttribute in Struts

Vivek Kr Agrawal
Ranch Hand

Joined: Sep 08, 2012
Posts: 32

I am trying request.setAttribute("AttributeName") and request.getAttribute("AttributeName") desperately in Struts but it is not working. Checked various sites and references but of no help.
Here is the detailed description:
In HomeAction, I am using


In home.jsp
I tried using both
<%=request.getAttribute("op") %>
<bean:write name="op"/>

my struts config looks like


Please suggest something.
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8265

You haven't given us much code or other information to go on, so let's start with basics:
- are you sure HomeAction is being executed?
- are you sure form1.getUSERID() returns a value?
- are you putting the action name, not the jsp name, in the URL?

"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
 
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: Request.setAttribute in Struts
 
Similar Threads
Newbie: Struts 1 -> Passing from one struts action to another
html:options
My struts app went crazy on Internet Explorer
setAttribute doesnot work during Forward action
unable to declare plugin inside struts-config.xml