I am now using
tomcat as the web container of
jsp file. In the web.xml, I have set the welcome page as loginPage which is a custom URL of the login.jsp.
<
servlet>
<servlet-name>loginjsp</servlet-name>
<jsp-file>/login.jsp</jsp-file>
</servlet>
<servlet-mapping>
<servlet-name>loginjsp</servlet-name>
<url-pattern>/loginPage</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>loginPage</welcome-file>
</welcome-file-list>
However, when I access the
http://localhost, the list of all the files of the corresponding directory is listed. The loginPage does not appear. However, when I change the loginPage to login.jsp in the <welcome-file> tag, the login.jsp appears. Why? the tag cannot allow the use the custom URL? How can I solve the problem that I don't want the link the jsp file appears in the browser. Thanks!
Stephen