Hobione's Weblog

Living & Breathing in Web 2.0 Era

Glassfish Default Welcome File List

http://test.amc.gov instead http://test.amc.gov/index.jsp

Under domains/domain1/cofig/default-web.xml

<!– ==Default Welcome File List========== –>

When a request URI refers to a directory, the default servlet looks for a “welcome file” within that directory and, if present, to the corresponding resource URI for display. If no welcome file is present, the default servlet either serves a directory listing, or returns a 404 status, depending on how it is configured.
If you define welcome files in your own application’s web.xml deployment descriptor, that list *replaces* the list configured here, so be sure that you include any of the default values that you wish to include.

 

<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>

 

It did not work so I went ahead added to my root application web.xml

 

<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
</welcome-file-list>

 

After redeploy my app, it worked.
Now I can access my domain or app without typing index.jsp/index.html/index.htm

February 14, 2008 Posted by HobiOne | GlassFish | | No Comments Yet