Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

RE: Question about Filter Mapping

nagesh.kumar

2006-12-12

Replies:

Remove this ".do?function=list"  from the url mapping and try once
I think its possible

Thanks
Nagesh

-----Original Message-----
From: Chetan Pandey [mailto:cpandey@(protected)]
Sent: Wednesday, December 13, 2006 8:50 AM
To: 'Struts Users Mailing List'
Subject: Question about Filter Mapping

Hi All:



I have written a Filter AuthFilter for my Struts App.



I am doing the following mapping.

   <filter>

       <filter-name>authFilter</filter-name>


<filter-class>com.blue.marketing.emailer.util.AuthenticationFilter</filter-c
lass>

   </filter>



<filter-mapping>

      <filter-name>authFilter</filter-name>

       <url-pattern>/manageEvent.do?function=list</url-pattern>

   </filter-mapping>

   



But the Filter is never entered as Debug statements are not printed.



The following is how my Action is mapped in struts-config.xml



<action path="/manageEvent"


type="com.blue.marketing.emailer.action.setupResponse.ManageEvent"

           parameter="function" name="eventForm" scope="session"

           validate="false" input="/setupResponse/eventList.jsp">

           <forward name="manage"

               path="/setupResponse/manageEvent.jsp" />

           <forward name="confirm"


path="/setupResponse/manageEventConfirmationPage.jsp" />

           <forward name="eventPreview"


path="/setupResponse/manageEventConfirmationPage.jsp" />

           <forward name="questionnaire"

               path="/manageQuestionnaire.do?function=add" />

           <forward name="success"

               path="/setupResponse/setupResponseMessage.jsp" />

           <forward name="list"

               path="/setupResponse/eventsList.jsp" />

           <forward name="report"

               path="/setupResponse/eventDetailReport.jsp" />

       </action>



I want to know what should be the correct URL-Mapping so that when the page
is clicked for manageEvent.do?function=list access rights are checked via
the Auth Filter.



Any help is appreciated.



Thanks.



Chetan









---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.