Yes, that's one way, but why don't use struts' ActionMessage ? example: in action: ActionMessages messages = new ActionMessages(); messages.add("",new ActionMessage("my.key.when.sucess")); this.saveMessages(request, messages); mapping.findForward("result");
in jsp: <html:messages id="message" message="true"> <bean:write name="message"/> </html:messages> it displays the key you specified in the action, of course this is only useful when mapping to the same jsp/servlet when success or failure Mvh Henning Jensen > -----Original Message----- > From: David Graham [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 25, 2003 6:10 PM > To: [EMAIL PROTECTED] > Subject: Re: dynamic value for ActionForwards ? > > > You can put the key name into the request and using struts-el do: > <bean:message key="${mykey}"/> > > David > > > >From: Matthias Wessendorf <[EMAIL PROTECTED]> > >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> > >To: Struts Users Mailing List <[EMAIL PROTECTED]> > >Subject: dynamic value for ActionForwards ? > >Date: 25 Mar 2003 18:10:58 +0100 > > > >Hello, > > > >if have got some action-classes, all doing handel a request > >and in case off success, they forward an actionForward. > >like this: > > > >perform() { > > > >boolean tmp = doSomeThing(); > > > >if(tmp) { > > actionForward = mapping.findForward("done"); > >} > >else { > > actionForward = mapping.findForward("bad"); > > > >} > > > >the jsp for "done" and "bad" are they same... > >but in one point they are different. > > > >one has this Tag > ><struts-bean:message key="done"/> > > > >and the other one has got a tag like this > ><struts-bean:message key="bad"/> > > > > > >Now there is my question, is the an "elegant" way to manage this problem > >because the count of my jsp-files grows and grows and grows... ;-) > > > >Thank you very much... > > > >Greetings > > > >Matthias > > > > > > > >--------------------------------------------------------------------- > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > > > > > _________________________________________________________________ > Add photos to your messages with MSN 8. Get 2 months FREE*. > http://join.msn.com/?page=features/featuredemail > > > --------------------------------------------------------------------- > 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]