struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Samere, Adam J" <asam...@paychex.com>
Subject RE: [SERVLET_FILTERS]
Date Mon, 28 Aug 2006 19:18:01 GMT
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:miroconnect@yahoo.com] 
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: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message