Joe,

Thanks for looking at it. Yes, I am saving the errors - I cut it too short here's all the code

if(!ud.isUserExist(username)){
errors.add(ActionMessages.GLOBAL_MESSAGE,
new ActionMessage("error.logon.invalid.user"));
log.debug("Invalid User: " + username + " Errors: " + errors.toString());
} else
errors.add(ActionMessages.GLOBAL_MESSAGE,
new ActionMessage("error.logon.invalid.password"));
saveErrors(request,errors);


Les



Joe Germuska wrote:

At 8:03 AM -0400 4/14/05, Les Dunaway wrote:

What am I messing up?


In the code you included in your email, you were not saving the errors. If that's not just a copy/paste mistake, then there's your problem.

Joe


I am having problems with Struts 1.2.4 ActionMessage / ActionError.

I'm using a setup like recommended on the wiki

ActionMessages am = new ActionMessages();
am.add( ActionMessages.GLOBAL_MESSAGE, new ActionMessage( "not.authorized.for.account" ) );
saveErrors( request, am );



<html:messages id="msg" message="false"> <bean:write name="msg" /> </html:messages>

My code:

LogonAction:

ActionMessages errors = new ActionMessages();
if(!ud.isUserExist(username)){
errors.add(ActionMessages.GLOBAL_MESSAGE,
new ActionMessage("error.logon.invalid.user"));
log.debug("Invalid User: " + username + " Errors: " + errors.toString());
Logon.jsp <h:messages id="msg" message="false">
<b:write name="msg" />
</h:messages>
Log4j from above: 102383 [http-8084-Processor42] DEBUG us.glsi.base.LogonAction - Invalid User: ferd Errors: {org.apache.struts.action.GLOBAL_MESSAGE=[error.logon.invalid.user[]]} I'm getting "2005-04-14 07:31:14 StandardWrapperValve[action]: Servlet.service() for servlet action threw exception
javax.servlet.jsp.JspException: Cannot find bean msg in any scope"


That says to me that the html:messages tag is seeing that there are messages (and
there are, I can see that in my log4j output) and then the bean:write tag isn't
seeing the msg bean that the messages tag should have created?? Right?



Les

------------------------------------------------------------------------
L.W.(Les) Dunaway
GL Services
770-974-4289 / 888-243-9886
[EMAIL PROTECTED]
"Great minds discuss ideas. Average minds discuss events. Small minds discuss people." - Admiral Hyman Rickover
------------------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
------------------------------------------------------------------------
L.W.(Les) Dunaway
GL Services
770-974-4289 / 888-243-9886
[EMAIL PROTECTED]
"Great minds discuss ideas. Average minds discuss events. Small minds discuss people." - Admiral Hyman Rickover
------------------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to