aspose file tools*
The moose likes Struts and the fly likes Request.setAttribute in Struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
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: 51

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.


Vivek Agrawal
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8866
    
    8

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://aspose.com/file-tools
 
subject: Request.setAttribute in Struts