Hi Rajil ,

First of all thanks a lot for your  response...

But one more thing i need to get clarify from you..Where shold i specify
this newly created class(newly created ActionServlet) in our project . Some
where in Struts-config.xml  ?....

Thanks in Advance.

Crazy worker.






rajil wrote:
> 
> Hi Crazy;
> 
> I had same requirement in one of my project.  And as I am using struts1.0
> I
> have extended ActionServlet class to validate all requests.
> 
> I have extended following method of ActionServlet.. 
> 
> protected ActionForward processActionPerform(Action arg0, ActionMapping
> arg1, ActionForm arg2, HttpServletRequest arg3, HttpServletResponse arg4)
> throws IOException, ServletException
> {
>       if(!(UserRights.validateUserRequestRights(arg1, arg3)))         
>       {
>               return arg1.findForward("unauthorized");
>       }
> 
>       return super.processActionPerform(arg0, arg1, arg2, arg3, arg4);
> }
> 
> I have global forward defined in Struts-config.xml
> 
> <forward name="unauthorized" path="accessdenied.jsp"/>
> 
> I hope above sample will help you.
> 
> Regards,
> Rajil Davda
> 
> -----Original Message-----
> From: ECLIPSE + CVS [mailto:anishpis...@gmail.com] 
> Sent: Saturday, January 10, 2009 1:43 PM
> To: user@struts.apache.org
> Subject: RequestProcessor Issue
> 
> 
> Hi,
> 
> I have a small query on Request Processor class. 
> 
> In my project i want to consider the user roles in some of the pages. For
> that i am planning to extend the RequestProcessor class to create one
> custom
> request processor and handle the role based things in the processRoles
> method. Here my problem is how can i show the "NO role message" in a new
> jsp
> page. From this method i tried to forward the response to a new action
> eg:(/noRole.do) . But this action is not taking correctly. So i think this
> is not the right way to do this. Also if any thing wrong plz correct me
> also.........
> 
> Plz help me....!!!
> 
> Thanks in Advance ,
> 
> Crazy Worker.
> -- 
> View this message in context:
> http://www.nabble.com/RequestProcessor-Issue-tp21385918p21385918.html
> Sent from the Struts - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
> 
> __________ NOD32 3755 (20090109) Information __________
> 
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/RequestProcessor-Issue-tp21385918p21386399.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to