Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Servlet 3.0 annotations <welcome-file>

Is it possible to set welcome-file tag from standard web.xml file by servlet 3.0 annotation ?

<welcome-file-list>
        <welcome-file>PageName.html</welcome-file>
</welcome-file-list>
like image 740
kislo_metal Avatar asked Mar 29 '10 19:03

kislo_metal


People also ask

What is welcome file in Servlet?

The welcome files mechanism allows you to specify a list of files that the web container will use for appending to a request for a URL (called a valid partial request) that is not mapped to a web component.

What is the use of @WebServlet annotation?

Use the @WebServlet annotation to define a servlet component in a web application. This annotation is specified on a class and contains metadata about the servlet being declared. The annotated servlet must specify at least one URL pattern. This is done by using the urlPatterns or value attribute on the annotation.


1 Answers

No, there is not such annotation at the moment. Servlet 3.0 annotations are InitParam, ServletFilter, WebServlet, WebServletContextListener, there's nothin for the welcome files in there.

like image 190
lexicore Avatar answered Oct 11 '22 22:10

lexicore