|
Oracle Fusion Middleware Java API Reference for Oracle WebLogic Server 12c (12.2.1) Part Number E55141-01 P4 Change 1723563 on 2015/10/09 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | ||||||||||
@Target(value=java.lang.annotation.ElementType.TYPE)
@Retention(value=RUNTIME)
public @interface WLFilter
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>
. . .
|
Copyright 1996, 2015, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Oracle Fusion Middleware Java API Reference for Oracle WebLogic Server 12c (12.2.1) Part Number E55141-01 P4 Change 1723563 on 2015/10/09 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||