Using nested double quotes, as you are doing, could be confusing the parser.
Try this instead:
<A HREF="<bean:message key='company.url'/>">something</A>
Note the use of single quotes around the 'key' value.
Hope this helps.
--
Martin Cooper
----- Original Message -----
From: "Sean" <jakarta@wideasleep.com>
To: "Struts User" <struts-user@jakarta.apache.org>
Sent: Monday, October 01, 2001 10:51 AM
Subject: html:link and bean:message usage together
> Hello All,
>
> I am trying to dynamically load a URL from the ApplicationResources file
via
> the bean:message tag in order to make it the href target of a html:link or
a
> <A HREF tag. I keep running into errors when trying to do this. I have
> tried:
>
> <A HREF="<bean:message key="company.url"/>">something</A>
>
> nothing, also tried:
>
> <html:link href="<bean:message key="company.url"/>">something</html:link>
>
> still nothing ... I also tried escaping the " marks in the bean:message
tag
> that didn't work either. Basically I want a attribute in the html:link
tag
> that allows you to specify a message resource or I want to be able to
save
> the value from the bean:message tag away into a variable. Or, finally I
> need to know how via a JSP I can get a handle to the MessageResources and
> extract the url I need from the resource bundle.
>
> Hasn't anyone else wanted to put regional specific URL's into their
> ApplicationResources.properties files to have different locals link to
> different web sites based on location? Seems like a pretty common thing
to
> me ... I hope this is enough info ... let me know if you need anything
else.
>
> Sean
>
|