Contact the core Jetty developers at www.webtide.com
private support for your internal/customer projects ... custom extensions and distributions ... versioned snapshots for indefinite support ... scalability guidance for your apps and Ajax/Comet projects ... development services from 1 day to full product delivery
DOCUMENTATION: Jetty 6 - this wiki. Jetty 7 - at Eclipse. Jetty8 - at Eclipse. Jetty 9 - at Eclipse.
Skip to end of metadata
Go to start of metadata
You are viewing an old version of this page. View the current version. Compare with Current ·  View Page History

Do welcome files need to exist?

The welcome file mechanism allows a request to /some/directory/ to be
served by the contents of a file like /some/directory/index.html.

If there is a servlet mapped to handle the welcome file, it will be called.
So if index.jsp is configured as a welcome file, then a request to /some/directory/
will be passed to the JspServlet mapped at *.jsp to handle the /some/directory/index.jsp file.

However, the file MUST exist for the welcome file mechanism to work. Even if index.do is defined as a welcome file, then a request to /some/directory/ will
not be passed to a servlet handling .do for some/directory/index.do *UNLESS THE FILE EXISTS.

If you want an index to be served by a servlet, then I suggest you use a filter
to do the redirection. See the http://fisheye.codehaus.org/browse/~raw,r=8/jetty/jetty/trunk/modules/jetty/src/main/java/org/mortbay/servlet/WelcomeFilter.java for an example.


FAQ
Back to FAQ


Labels
  • None
Contact the core Jetty developers at www.webtide.com
private support for your internal/customer projects ... custom extensions and distributions ... versioned snapshots for indefinite support ... scalability guidance for your apps and Ajax/Comet projects ... development services from 1 day to full product delivery