Versions Compared

Key

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

...

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

Code Block
xml
xml
titleLoginServlet delcaration and mapping in web.xmlxml
    <!-- 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:

Code Block
java
java
titleExample of forwarding the requestjava
app.getRequestDispatcher(serviceSuccess).forward(request, response);
Code Block
xml
xml
titleConfiguring the Login views in web.xmlxml
    <!-- 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>

...