A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
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
Forward to new action during the execution of another action
How to forward to Action class
Struts forward question
Struts - Forwarding to another Servlet
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014