On Fri, Mar 02, 2001 at 04:53:58PM -0800, Richard D. LeCour wrote:
> Here's some examples of what I'd like to do:
> 
> <template:put name='some.name' content='<bean:message key="some.message"/>'
> direct='true'/>

Especially this case is resolvable:

<template:put name="some.name">
  <bean:message key="some.message" />
</template:put>

>     or
> <html:img src='<bean:message key="image.url"/>' width='<bean:message
> key="image.width"/>' height='<bean:message key="image.height"/>'/>
>     or even
> <% someVar = '<bean:message key="image.url"/>'; %>
> 
> But Struts doesn't seem to allow that. Can anyone suggest simple
> alternatives? I am REALLY stuck. Thanks!
> 

I would not use bean:message for these cases. It's main purpose to hold
internationalized messages  and I hardly believe it would be the appropriate
structure for sitemap-like data. For these things you should use xml
files or databse. Then initialize some beans from these datastores and
you can use at least the standrad jsp scripting to access the properties.
                                                                 incze

Reply via email to