in your <html:message> tag you need to set the "message" property to true.
You'd end up with something like this

<html:messages id="message" message="true">
   <bean:write name="message"/><br>
</html:messages>



                                                                                       
                                                
                      "Travis Stevens"                                                 
                                                
                      <[EMAIL PROTECTED]        To:       [EMAIL PROTECTED]            
                                    
                      oaa.gov>                 cc:                                     
                                                
                                               Subject:  messages 101                  
                                                
                      07/28/2003 12:47                                                 
                                                
                      PM                                                               
                                                
                      Please respond to                                                
                                                
                      "Struts Users                                                    
                                                
                      Mailing List"                                                    
                                                
                                                                                       
                                                
                                                                                       
                                                




I can't seem to get messages to work.  My action code has this line of
code:

//create a message
ActionMessages messages = new ActionMessages();
messages.add(ActionMessages.GLOBAL_MESSAGE, new
ActionMessage("record.save.success",new Integer(record.getUID())));
this.saveMessages(request,messages);

//log it
if (log.isInfoEnabled()){
      log.info("Record saved successfully:" + record.getUID());
}

and my view has this:
<html:messages id="error">
   <bean:write name="error"/><br />
</html:messages>

and my struts-config has:
<message-resources parameter="gov.noaa.mm.NMMRResources"/>


Nothing prints out in my view.  What am I missing here?  The log message
"Record saved successfully" shows up, so I know that the messages are
being saved.  My ActionErrors work fine so I know my message-resources
are being used properly.

The javadoc for Action.saveMessages() reads:
 Save the specified messages keys into the appropriate request attribute
for use by the <html:messages> tag (if messages="true" is set), if any
messages are required.

Is this my problem?  Do I have to set messages to "true".  Where do I
set messages="true"?

thanks,
-Trav



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







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

Reply via email to