This worked a month ago and now i reload the code and it doesn’t work. here is my struts snip
<action name="checkManager" class="CheckAction">
<result>/pages/check_manager.jsp</result>
</action>
<action name="submitFile" class="SubmitFileAction">
<result name="success">/pages/submit_file.jsp</result>
<result name="error">/pages/check_manager.jsp</result>
</action>
So, the first page is checkManager. it has a button that calls the submitFile action. When that fires, it checks a password, if it fails the action class sends an error result. Now a month ago the result error above would redirect the user back to the original check_manager.jsp page complete with data that was loaded originally and the error message. Today, it redirects the user to the raw check_manager.jsp page. no data, its like the servlet never fired and its just rendering a blank jsp page. I checked the source history and nothing has changed in this application.
I don’t understand why this would stop working, can anyone give me an idea? i have to present this to the client in about an hour and a half so i’m really stuck here.
note, i tried changing the error to this
<result name="error" type="redirectAction">checkManager</result>
and I get my data back, but i loose my error message which isn’t a good thing. ugh, any ideas?
if (enteredHash.equals(storedHash)) {
_log.debug("The password matched");
UserSession<User> userSession = (UserSession<User>) session
.get("user");
#do logic#
} else {
_log.debug("The password didn't match");
addActionError("The password you entered was incorrect, nothing was sent to the bank.");
return ActionSupport.ERROR;
}
return ActionSupport.SUCCESS;
my jsp
<s:if test="hasActionErrors()">
<div class="errors">
<s:actionerror/>
</div><br>
</s:if>
again, this worked perfectly a month ago. All i did was check out that branch which has been untouched and deploy it. Now it doesn’t work.
A quick fix could be to add this to
getCheckListin theCheckAction:and add this to the
SubmitFileAction:This is not a good permanent solution but should get you where you need to get in a crunch!