Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
Tomcat (and perhaps other servlet containers (such as JBoss, which embeds Tomcat) does not dispatch URL's in the welcome-file-list to a servlet, even if there is a servlet-mapping which matches the URL. Thus, Click pages don't work properly as a welcome page, unless a little something extra is done. The simplest solution is to use a jsp that directs to the Click page as the welcome-file.
In web.xml:
<welcome-file-list>
<welcome-file>/welcome-redirect.jsp</welcome-file>
</welcome-file-list>
In welcome-redirect.jsp:
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ page isThreadSafe="true" isErrorPage="false" session="false" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<c:redirect url="/welcome.htm" />