struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Hightower" <>
Subject RE: Help: messagesPresent = true if JSP is served from ActionServlet
Date Thu, 22 Jan 2004 17:56:29 GMT
comments below....

Rick Hightower

Struts/J2EE training --

Struts/J2EE consulting --

-----Original Message-----
From: Chris Wall []
Sent: Thursday, January 22, 2004 10:22 AM
Subject: Help: messagesPresent = true if JSP is served from

Hey there.

Noticed that messagesPresent is TRUE when a JSP is served from an
ActionServlet.  This causes logic within <messagesPresent> to be executed-
for example validation errors are inappropriately displayed.  This works
fine if the JSP is render directly, but a common practice is for all web
navigation to flow in and out of ActionServlets.

**** I have never seen this happen before. How long have you been using
Struts? (This is not a jab but a serious question.)
**** MVC/Model 2 requires that requests go throught the controller, and the
controller selects the next view.

*** What are the error messages?
*** Which class in the system saves those error messages in the first place?
an ActionForm? an Action? a Custom RequestProcessor?
*** Typically only ActionForms and Actions genereate error messages.

*** Suggestions:
*** Look at the message. Look in the resource bundle. Find the key
associated with the message. Grep your source for the key to see who is
putting the message in.

I'm assuming that this is happening because the request contains either
ActionMessages or ActionErrors or both.  I tried setting both to null within
the ActionServer before rendering the JSP (saveMessages(request, null); and
saveErrors(request, null);), but that did not work.  Argh.

*** Explain this. What is the ActionServer?
*** Do you mean you do this in an Action? RequestProcessor? or did you
override the ActionServlet?
*** When do you do this?

How can I resolve this?  Thanks.

*** I gave some pointers above. Turn on logging to a high level using
commons logging.

- Chris

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message