@Target(value=TYPE)
@Retention(value=RUNTIME)
@Documented
public @interface WebServlet
Servlet
. value
or
urlPattern
attribute of the annotation, but not both.value
attribute is recommended for use when the URL pattern is
the only attribute being set, otherwise the urlPattern
attribute
should be used.HttpServlet
. @WebServlet("/path")}
public class TestServlet extends HttpServlet ... {
@WebServlet(name="TestServlet", urlPatterns={"/path", "/alt"})
public class TestServlet extends HttpServlet ... {
Modifier and Type | Optional Element and Description |
---|---|
boolean |
asyncSupported |
java.lang.String |
description |
java.lang.String |
displayName |
WebInitParam[] |
initParams |
java.lang.String |
largeIcon |
int |
loadOnStartup |
java.lang.String |
name |
java.lang.String |
smallIcon |
java.lang.String[] |
urlPatterns |
java.lang.String[] |
value
A convenience method, to allow extremely simple annotation of a class.
|
public abstract java.lang.String[] value
urlPatterns()
public abstract java.lang.String[] urlPatterns
public abstract WebInitParam[] initParams
public abstract boolean asyncSupported
public abstract java.lang.String smallIcon
public abstract java.lang.String largeIcon
Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.