Uploaded image for project: 'Click'
  1. Click
  2. CLK-258

How To Use Click Page As Default Welcome Page in Tomcat

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 2.2.0
    • documentation
    • 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" />

      Attachments

        Activity

          People

            a_adrian Adrian A.
            jas Joel Schmidt
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: