Short answer: Yes.

An instance of the filter-class will be created for each filter you define, 
regardless of how many times you reuse a filter class in a single deployment 
descriptor.

Adam 

-----Original Message-----
From: temp temp [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 28, 2006 3:13 PM
To: user@struts.apache.org
Subject: [SERVLET_FILTERS]

      <filter>
            <filter-name>SearchResultsFilter.CheckIn</filter-name>
          
<filter-class>com.reisys.fema.ndsp.web.filter.SearchResultsFilter</filter-class>
          <init-param>
            <param-name>req_attribute_name</param-name>
            <param-value>taskInstances</param-value>
          </init-param>
        </filter>
        <filter-mapping>
          <filter-name>SearchResultsFilter.CheckIn</filter-name>
          <url-pattern>/action/workflow/taskinstance/checkin.do</url-pattern>
        </filter-mapping>
       
        <filter>
            <filter-name>SearchResultsFilter.Assign</filter-name>
          
<filter-class>com.reisys.fema.ndsp.web.filter.SearchResultsFilter</filter-class>
          <init-param>
            <param-name>req_attribute_name</param-name>
            <param-value>workInstances</param-value>
          </init-param>
        </filter>
        <filter-mapping>
          <filter-name>SearchResultsFilter.Assign</filter-name>
          <url-pattern>/action/workflow/workinstance/assign.do</url-pattern>
        </filter-mapping>
       
       
      I have a  servlet filter which should behave different based on  
parameter passed to it. Above is a mapping of  a filter with different names 
but the same Filter class  SearchResultsFilter to different urls's.
       
      The init  method of the filter  SearchResultsFilter.CheckIn  and 
SearchResultsFilter.Assign   will be common or different ? Suppose 
SearchResultsFilter.CheckIn is called first and in  the init method I 
initialize some variables and later SearchResultsFilter.Assign  is called at 
this time will the init method  be called again ?
       
       
       
    
                
---------------------------------
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls.  Great rates 
starting at 1ยข/min.

-----------------------------------------
The information contained in this message may be privileged,
confidential, and protected from disclosure. If the reader of this
message is not the intended recipient, or any employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution, or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify us immediately
by replying to the message and deleting it from your computer.

Thank you. Paychex, Inc.


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

Reply via email to