Valid user login check in struts
1 posts in topic
Flat View  Flat View

Posted By:   devang_parikh
Posted On:   Tuesday, March 18, 2003 11:35 PM

I use to put "valid user login check code" at the top of all the JSP pages.

I saw the Struts demo application "struts-example". In this application they have also created on custom tag which use to check validity of logged in user. But they have also put that custom tag in all related JSP pages.

My concern is can we check validity of user in Actionservlet
Controller ???
Coz ideally speaking request processing, security check kind of processes we should put in Contoller in MVC application.

Re: Valid user login check in struts

Posted By:   Christopher_Koenigsberg  
Posted On:   Wednesday, March 19, 2003 06:34 AM

You could check in both places. To me it belongs on each jsp page as in your first example, because if someone is not authorized, they shouldn't even see the response from that page. Instead, they should be forwarded to the login page. But you could do another check in your Action to be sure they are authorized to actually submit that request? if you had some weird situation where they could view a page but not actually submit it? (sounds like a screwy design to me)

About | Sitemap | Contact