@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 |
String |
description |
String |
displayName |
WebInitParam[] |
initParams |
String |
largeIcon |
int |
loadOnStartup |
String |
name |
String |
smallIcon |
String[] |
urlPatterns |
String[] |
value
A convenience method, to allow extremely simple annotation of a class.
|
public abstract String name
public abstract String[] value
urlPatterns()
public abstract String[] urlPatterns
public abstract int loadOnStartup
public abstract WebInitParam[] initParams
public abstract boolean asyncSupported
public abstract String smallIcon
public abstract String largeIcon
public abstract String description
public abstract String displayName
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.