Package javax.servlet.annotation
Annotation Type WebServlet
-
@Target(TYPE) @Retention(RUNTIME) @Documented public @interface WebServlet
Annotation used to declare a servlet.This annotation is processed by the container at deployment time, and the corresponding servlet made available at the specified URL patterns.
- Since:
- Servlet 3.0
- See Also:
Servlet
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description boolean
asyncSupported
Declares whether the servlet supports asynchronous operation mode.String
description
The description of the servletString
displayName
The display name of the servletWebInitParam[]
initParams
The init parameters of the servletString
largeIcon
The large-icon of the servletint
loadOnStartup
The load-on-startup order of the servletString
name
The name of the servletString
smallIcon
The small-icon of the servletString[]
urlPatterns
The URL patterns of the servletString[]
value
The URL patterns of the servlet
-
-
-
Element Detail
-
name
String name
The name of the servlet- Returns:
- the name of the servlet
- Default:
- ""
-
-
-
value
String[] value
The URL patterns of the servlet- Returns:
- the URL patterns of the servlet
- Default:
- {}
-
-
-
urlPatterns
String[] urlPatterns
The URL patterns of the servlet- Returns:
- the URL patterns of the servlet
- Default:
- {}
-
-
-
initParams
WebInitParam[] initParams
The init parameters of the servlet- Returns:
- the init parameters of the servlet
- Default:
- {}
-
-
-
asyncSupported
boolean asyncSupported
Declares whether the servlet supports asynchronous operation mode.- Returns:
true
if the servlet supports asynchronous operation mode- See Also:
ServletRequest.startAsync()
,ServletRequest.startAsync(ServletRequest, ServletResponse)
- Default:
- false
-
-
-
smallIcon
String smallIcon
The small-icon of the servlet- Returns:
- the small-icon of the servlet
- Default:
- ""
-
-
-
largeIcon
String largeIcon
The large-icon of the servlet- Returns:
- the large-icon of the servlet
- Default:
- ""
-
-
-
description
String description
The description of the servlet- Returns:
- the description of the servlet
- Default:
- ""
-
-
-
displayName
String displayName
The display name of the servlet- Returns:
- the display name of the servlet
- Default:
- ""
-
-