The way I have implemented it in the past is to have a /secure in the
mapping for pages that are protected by Login.  


In the web.xml I did the following.

<filter filter-name='VerifyLoginFilter'
filter-class='com.companyname.applicationname.filters.VerifyLoginFilter'>
  <init-param login_page='/Login.do'/>
</filter>

The mapping in struts-config.xml is as follows.

<action path="/secure/Foo" name="Foo"
type="com.companyname.applicationname.control.FooAction" scope="request"
validate="false">
  <forward name="show_foo" path="/jsp/bar/foo.jsp" />
</action>



-----Original Message-----
From: Sterin, Ilya [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 27, 2003 11:13 AM
To: '[EMAIL PROTECTED]'
Subject: Filters and Struts


I'd like to know if anyone has used and/or knows the best way to use a Login
Filter with Struts.  Before utilizing struts, I simply filtered say a
"members" directory, which took care of all JSP pages there...

Since struts relies on forwarding, forwarding to those pages does not
utilize the filter, therefore, it allows anonymous access.  

If not filters, what are other good/best approaches.

Thanks.

Ilya

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to