![]() |
![]() |
||||
At line 3 changed 1 line. |
This tag specifies the page name of a single welcome file. |
This tag specifies the relative path of a single welcome file. |
At line 5 changed 1 line. |
A welcome file is provided when a website or web application is accessed using only the domain name (http://www.website.com/). |
A welcome file is provided when the web application is accessed using only the domain name, or with any other URL that ends with a slash. |
At line 9 changed 1 line. |
The leading slash should not be specified. |
The page or servlet should be specified without any leading slash. Only relative paths can be specified. |
At line 16 changed 1 line. |
Example 2: a file in /info/help.htm (not sure why you would want to do this, but it is possible!) |
Example 2: a JSP file at /info/help.jsp (the path info/help.jsp becomes relative to whichever folder is accessed, so this is not recommended for use as the only welcome-file in the list) |
At line 21 changed 1 line. |
Example 3: if you are using a servlet, and the <[url-pattern|web.xml.URLPattern]> for the servlet is /servlet/MyServlet, you would specify servlet/MyServlet, without the leading slash. |
Example 3: using a servlet with a <[url-pattern|web.xml.URLPattern]> of /MyServlet |
At line 23 added 5 lines. |
<welcome-file>MyServlet</welcome-file> |
}}} |
Example 4: using a servlet with a <[url-pattern|web.xml.URLPattern]> of /servlet/MyServlet. Note that like Example 2, this path is relative, so if the user attempts to access http://<domainName>/<appName>/someFolder, this won't work unless you also have a mapping for /someFolder/servlet/MyServlet |
{{{ |