Jetty has moved!
Jetty is a project at the Eclipse Foundation.
Homepage:http://www.eclipse.org/jetty
Downloads: http://download.eclipse.org/jetty/
Documentation:http://www.eclipse.org/jetty/documentation/current/
About:http://www.eclipse.org/jetty/about.php
Jetty Powered:http://www.eclipse.org/jetty/powered/
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
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

« Previous Version 12 Next »

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 WelcomeFilter.java for an example.

Not working with struts actions

In order to use a struts action as a welcome file, you will need to set redirectWelcome in Default Servelt to true. The default is for redirectWelcome to be false, which means the page will be forwarded to, and the action never called.

  • No labels
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