Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-2851

IE 6 redirects to wrong action/page



    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.0.9
    • Fix Version/s: Future
    • Component/s: None
    • Labels:
    • Environment:

      Windows Server 2003
      IE 6.0 (tried 2 versions of IE: 6.0.3790.0, 6.0.3790.1830)


      In struts.xml, login button is tied to LoginAction, however it sometimes goes into another action/page, RegisterAction/register_new_user.jsp.
      The page works fine with FireFox and IE 7, but not IE 6.

      Snippet of struts.xml
      <action name="doLogin_*" class="com.dds.paymentgateway.pgweb.enduser.actions.LoginAction" method="

      <interceptor-ref name="defaultStack">
      <!-- These are methods invoked from buttons on the login page. No validation needed. -->
      <param name="validation.excludeMethods">input,register,gotoFirstPage,retPassword,reloadPrepaid</param>
      <result name="input">/WEB-INF/pages/login.jsp</result>
      <result name="success" type="redirect-action">reloadPrePaidUser_input</result>
      <result name="register" type="redirect-action">register_input</result>
      <result name="ret_pw" type="redirect-action">retrievePassword_input</result>
      <result name="reload_pp" type="redirect-action">reloadPrePaidUser_inputFromLogin</result>

      <action name="register_*" class="com.dds.paymentgateway.pgweb.enduser.actions.RegisterAction" method="{1}

      <interceptor-ref name="defaultStack">
      <param name="validation.excludeMethods">input,populate,empty</param>
      <interceptor-ref name="myToken">
      <param name="excludeMethods">input,populate,empty</param>
      <result name="input">/WEB-INF/pages/register_new_user.jsp</result>
      <result name="success" type="redirect-action">doLogin_input</result>
      <result name="invalid.token">/WEB-INF/pages/register_new_user.jsp</result>

      <action name="retrievePassword_*" class="com.dds.paymentgateway.pgweb.enduser.actions.RetrievePasswordAction" method="


      <interceptor-ref name="defaultStack" />
      <interceptor-ref name="myToken">
      <param name="excludeMethods">input</param>
      <result name="success" type="redirect-action">doLogin_input</result>
      <result name="input">/WEB-INF/pages/retrieve_password.jsp</result>
      <result name="invalid.token">/WEB-INF/pages/retrieve_password.jsp</result>

      Snippet of login.jsp
      <%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
      <%@ taglib prefix="s" uri="/struts-tags" %>
      <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
      <s:head theme="ajax" />
      <title><s:text name="title.login"/></title>
      <script type="text/javascript">
      function submitForm()
      <body >
      <s:form name="loginForm" action="doLogin_retPassword" theme="simple">

      • default form action "doLogin_retPassword" by passes validation:-
      • We will change to use default action when "Login" is pressed .
      • By default, we need to have the form action to not do any validation. Otherwise, any other modified action
      • (eg. having javascript to change the form action's value) will all have login's validation associated with it, regardless
      • of struts.xml 's configured "validation.excludeMethods" param values for those actions.
        (eg. we could have entered in one email field in the login form
        and pressed "forgot password" link, and we'd be brought back to the login screen with
        "password is required" validation error).
        <!-- the login button -->
        <td><s:submit id="loginButton" type="button"
        cssStyle="width: 70px;" value="% {getText('login')}

        " action="doLogin" /></td>

      <!-- the Retrieve password link -->
      <td><!-- use javascript here to make the href do a submit -->
      <!-- this is done because otherwise form values won't get passed in correctly if submit isn't used. -->
      <s:a href="Forgot_Password" id="retPassword" cssClass="small" onclick="submitForm(); return false;">
      <s:text name="forgotpassword" />

      <!-- register link -->
      <td><s:a href="doLogin_register.action" id="register" cssClass="small" onclick="submitForm();">
      <s:text name="notyetregistered" />
      <!-- the register button, next to the register link -->
      <td><s:submit type="button" value="%


      " action="doLogin_register" /></td>





            • Assignee:
              maria Maria Kan
            • Votes:
              0 Vote for this issue
              0 Start watching this issue


              • Created: