File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
EJB 3 in Action
this week in the
EJB and other Java EE Technologies
setAttribute doesnot work during Forward action
Joined: Apr 24, 2009
Apr 24, 2009 04:53:58
I am working on an application where in action1 I set an attribute, and the forward takes us to a jsp and i try to access the attribute using getAttrbute set in action1.
But I get a traceback.
Code snippet in action1
request.setAttribute("access", privilege); return mapping.findForward(ADMIN);
<action name="LoginForm" path="/login" scope="request" type="com.LoginAction" validate="true"> <forward name="administartor" path="/finance.jsp" /> </action
<% String access = request.getAttribute("access").toString(); %>
But am getting a traceback.. Can anyone help me out
I agree. Here's the link:
subject: setAttribute doesnot work during Forward action
How to forward to Action class
Struts - Forwarding to another Servlet
Struts forward question
Forward to new action during the execution of another action
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014