struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bart Schrever" <bart.schre...@pandora.be>
Subject RE: dynamic bean message
Date Tue, 14 May 2002 23:09:19 GMT
try  single quotes on the tag attribute:
<bean:message key='<%= request.getAttribute("status") %>' />

-----Oorspronkelijk bericht-----
Van: Boon Chew [mailto:boon@vizxlabs.com]
Verzonden: dinsdag 14 mei 2002 23:38
Aan: struts-user@jakarta.apache.org
Onderwerp: dynamic bean message



I searched on the archive and didn't find an question similar to this...

What I am trying to achieve is when the action servlet is done its job it
would forward to a
generic JSP page that will show the appropriate message to the user.

For example, at the end of the action servlet,

// save the message resource key
request.setAttribute("status", "status.success");
return (mapping.findForward("message"));

And in message.jsp, I tried doing this in hope of display different message
depending on what is being set in the status attribute.

<bean:message key="<%= request.getAttribute("status") %>" />

The above line won't work.  It seems like doing a JSP expression within a
tag is not allowed...is there another way or a better way to achieve this?

- boon


--
To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@jakarta.apache.org>




--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message