Hi!, my problem is the following, i want to save a ActionMessages object in the session object and then to display it in my JSP, how i can do it?, thanks
In your action class, you set the message like this
Code:
ActionMessages messages = new ActionMessages();
messages.add("statusMessage", new ActionMessage("message.key"));
saveMessages(request.getSession(), messages);
// you can save it to request too if you don't need to the message to appear in subsequence page
// saveMessages(request, messages);
where "message.key" is one of the property key in the Application Resource file.
ok byam, very thanks, i didn't know that the method saveMessages(HttpSession,ActionMessages) it existed, it's version 1.2 of Struts and i use 1.1, i'll have to change the version.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.