struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: html:link and bean:message usage together
Date Tue, 02 Oct 2001 04:28:17 GMT
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" <>
To: "Struts User" <>
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
> the bean:message tag in order to make it the href target of a html:link or
> <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
> that didn't work either.  Basically I want a attribute in the html:link
> that allows you  to specify a message resource or I want to be able to
> 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
> files to have different locals link to
> different web sites based on location?  Seems like a pretty common thing
> me ... I hope this is enough info ... let me know if you need anything
> Sean

View raw message