struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Maria Kan (JIRA)" <>
Subject [jira] Created: (WW-2851) IE 6 redirects to wrong action/page
Date Mon, 27 Oct 2008 17:23:37 GMT
IE 6 redirects to wrong action/page

                 Key: WW-2851
             Project: Struts 2
          Issue Type: Bug
    Affects Versions: 2.0.9
         Environment: Windows Server 2003
IE 6.0 (tried 2 versions of IE: 6.0.3790.0, 6.0.3790.1830)

            Reporter: Maria Kan

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=""
			<interceptor-ref name="defaultStack">
				<!-- There 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=""
			<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=""
			<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" "">
<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="%{getText('register')}"  action="doLogin_register"


This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message