Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

CAS server may issue redirects in response to requests for its /login URL, which is mapped to the Login servlet.

Code Block
xmlxml
titleLoginServlet delcaration and mapping in web.xml
xml
    <!-- Login -->
    <servlet>
      <servlet-name>Login</servlet-name>
      <servlet-class>edu.yale.its.tp.cas.servlet.Login</servlet-class>
    </servlet>
   <!-- ... --->
    <servlet-mapping>
      <servlet-name>Login</servlet-name>
      <url-pattern>/login</url-pattern>
    </servlet-mapping>

...

The Login servlet will use a RequestDispatcher to forward to one of the relative URLs with which it was configured at servlet initialization.

For example:

java
Code Block
java
titleExample of forwarding the request
java
app.getRequestDispatcher(serviceSuccess).forward(request, response);
xml
Code Block
xml
titleConfiguring the Login views in web.xml
xml
    <!-- Login page URL -->
    <context-param>
        <param-name>edu.yale.its.tp.cas.loginForm</param-name>
        <param-value>/login.jsp</param-value>
    </context-param>

    <!-- Page URL for generic login success message -->
    <context-param>
        <param-name>edu.yale.its.tp.cas.genericSuccess</param-name>
        <param-value>/success.jsp</param-value>
    </context-param>

    <!-- Page URL for simple JavaScript-based redirection -->
    <context-param>
        <param-name>edu.yale.its.tp.cas.redirect</param-name>
        <param-value>/redirect.jsp</param-value>
    </context-param>

    <!-- Page URL for login success message when 'service' is specified -->
    <context-param>
        <param-name>edu.yale.its.tp.cas.serviceSuccess</param-name>
        <param-value>/goService.jsp</param-value>
    </context-param>

    <!-- Page URL for login success message + confirmation
         when 'service' is specified -->
    <context-param>
        <param-name>edu.yale.its.tp.cas.confirmService</param-name>
        <param-value>/warnService.jsp</param-value>
    </context-param>

...