File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Message Resource problem. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Message Resource problem." Watch "Message Resource problem." New topic
Author

Message Resource problem.

sudhakar Tadepalli
Ranch Hand

Joined: Dec 27, 2001
Posts: 130
I have following code for displaying error or messages in the jsp. But it doesn't work. Could some see where I am doing wrong ?

In Action Class :

MessageResources messageResources = getResources(request);
ActionErrors actionErrors = new ActionErrors();
actionErrors.add("error", new ActionMessage("message.lockbatch",
batchNumberFromList, lockedUID));
saveMessages(request, actionErrors);

Properties file:
message.lockbatch= The batch you have selected or enterted a batch number :<font color="red"> {0} </font> which is locked by user <font color="red"> {1} </font>

IN JSP:

<logic:messagesPresent message="true">
<html:messages id="msg" message="true">
<bean:write name="msg"/> <br/>
</html:messages>
</logic:messagesPresent>
sudhakar Tadepalli
Ranch Hand

Joined: Dec 27, 2001
Posts: 130
I solved the problem myself. Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Message Resource problem.
 
Similar Threads
html:messages
Global excpetion-getting print stack trace?
Using ActionMessages to display Errors using errors.headers and errors.footers
Problem with ActionMessage
ActionMessages & logic:messagesPresent