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

Advertisements

February 14, 2008 - Posted by | GlassFish

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: