You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Juan Alvarado (Struts List)" <ju...@manduca.com> on 2002/03/21 18:02:43 UTC

message keys

I am trying to ouput the following:

<a href="http://some.website.com"><img src="<bean:message
key="url"/>/home10-08-00/img/b_cvfut.gif" width="93" height="56"
border="0"></a>

The problem is that the call to <bean:message... returns nothing but plain
text. I have even tried it with single quotes and no luck.

If anybody knows a work around for this, please let me know.

Thanks

**********************************************
Juan Alvarado
Internet Developer -- Manduca Management
(786)552-0504
jalvarado@manduca.com
AOL Instant Messenger: juan2000@aol.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: message keys

Posted by Ted Husted <hu...@apache.org>.
The bean message tag is tied to the application resources. For this to
work there must be an entry named url. There is not enough information
here to determine what you are trying to do. It's possible that you may
mean to use bean:write to access an url property on a bean that has been
passed to the page. 

http://www.tuxedo.org/~esr/faqs/smart-questions.html

For what you *may* be trying to do, <html:rewrite/> may work. This would
let you define something like 

     <forward 
        name="url"          
        path="/assets/images/"/> 

in the struts-config, and the use it on a page at runtime.

<IMG src='<html:rewrite name="url"/>/home10-08-00/img/b_cvfut.gif'
width='93' height='56' border='0'>

This is also a good way to cope with paths to stylesheets, Javascripts,
and other HTML assets.

-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services


"Juan Alvarado (Struts List)" wrote:
> 
> I am trying to ouput the following:
> 
> <a href="http://some.website.com"><img src="<bean:message
> key="url"/>/home10-08-00/img/b_cvfut.gif" width="93" height="56"
> border="0"></a>
> 
> The problem is that the call to <bean:message... returns nothing but plain
> text. I have even tried it with single quotes and no luck.
> 
> If anybody knows a work around for this, please let me know.
> 
> Thanks
> 
> **********************************************
> Juan Alvarado
> Internet Developer -- Manduca Management
> (786)552-0504
> jalvarado@manduca.com
> AOL Instant Messenger: juan2000@aol.com
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>