jakarta.servlet.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.jakarta.servlet.http.HttpServlet . @WebServlet("/path")}
public class TestServlet extends HttpServlet ... {@WebServlet(name="TestServlet", urlPatterns={"/path", "/alt"})
public class TestServlet extends HttpServlet ... {| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| public String | |
| public String | |
| public WebInitParam[] | |
| public String | |
| public int | |
| public String | |
| public String | |
| public String[] | |
| public String[] | Returns: array of URL patternsA convenience method, to allow extremely simple annotation of a class. |
| asyncSupported | back to summary |
|---|---|
public boolean asyncSupported()
| |
| description | back to summary |
|---|---|
public String description()
| |
| displayName | back to summary |
|---|---|
public String displayName()
| |
| initParams | back to summary |
|---|---|
public WebInitParam[] initParams()
| |
| largeIcon | back to summary |
|---|---|
public String largeIcon()
| |
| loadOnStartup | back to summary |
|---|---|
public int loadOnStartup()
| |
| name | back to summary |
|---|---|
public String name()
| |
| smallIcon | back to summary |
|---|---|
public String smallIcon()
| |
| urlPatterns | back to summary |
|---|---|
public String[] urlPatterns()
| |
| value | back to summary |
|---|---|
| public String[] value() A convenience method, to allow extremely simple annotation of a class.
| |