BEA Systems, Inc.

weblogic.servlet.annotation
Interface WLFilter

All Superinterfaces:
Annotation

@Target(value=TYPE)
@Retention(value=RUNTIME)
public interface WLFilter
extends Annotation

The WLFilter annotation is used to mark a Filter class with necessary metadata so it can be deployed without being declared in the web.xml descriptor.

Example:

  @WLFilter (
    name = "BAR",
    initParams = { @WLInitParam (name="one", value="1") }
    mapping = {"/bar/*"}
  )
  public class MyFilter implements Filter { . . . }
 

Annotating a Filter class with the above annotation is equivalent to declaring the following in the web.xml descriptor:

  . . .
  <filter>
    <filter-name>BAR</filter-name>
    <filter-class>MyFilter</filter-class>
    <init-param>
       <param-name>one</param-name>
       <param-value>1</param-value>
    </init-param>
  </filter>
  . . .
  <filter-mapping>
    <filter-name>BAR</filter-name>
    <url-pattern>/bar/*</url-pattern>
  </filter-mapping>
  . . .
 


Method Summary
 String description()
          The description attribute for the Filter.
 String displayName()
          The display name attribute for the Filter.
 String icon()
          The icon attribute for the Filter.
 WLInitParam[] initParams()
          The init parameters for the Filter.
 String[] mapping()
          The url patterns for the Filter mapping.
 String name()
          The name attribute for the Filter.
 
Methods inherited from interface java.lang.annotation.Annotation
annotationType, equals, hashCode, toString
 

Method Detail

description

String description()
The description attribute for the Filter. This corresponds to the 'description' attribute on the filter element in the web.xml descriptor. Defaults to an empty string.


icon

String icon()
The icon attribute for the Filter. This corresponds to the 'icon' attribute on the filter element in the web.xml descriptor. Defaults to empty string


displayName

String displayName()
The display name attribute for the Filter. This corresponds to the 'display-name' attribute on the filter element in the web.xml descriptor. Defaults to an empty string.


name

String name()
The name attribute for the Filter. This corresponds to the 'name' attribute on the filter element in the web.xml descriptor. If absent, this will default to the class name of the Filter being annotated.


initParams

WLInitParam[] initParams()
The init parameters for the Filter. This corresponds to the 'init-param' attribute on the filter element in the web.xml descriptor.


mapping

String[] mapping()
The url patterns for the Filter mapping. This corresponds to the 'filter-mapping' attribute on the filter element in the web.xml descriptor.


Documentation is available at
http://download.oracle.com/docs/cd/E13222_01/wls/docs100
Copyright 2006 BEA Systems Inc.