Solved: Access to localized messages to build an href

2002-01-08 Thread Jim Tomlinson


Got around it by using the actual locale:

  <%@ page import="org.apache.struts.action.Action" %>

  

  ">Click here
  

I still haven't answered my original question, but it's now moot.

> -Original Message-
> From: Jim Tomlinson 
> Sent: Monday, January 07, 2002 3:39 PM
> To: '[EMAIL PROTECTED]'
> Subject: Access to localized messages to build an href
> 
> 
> I'm trying to get access to the MessageResources object that, 
> according to
> the docs, is an application scope bean. I need to build an 
> href in this
> manner:
> 
>+
> "/refend.html"%>">Click here
>   
> 
> Of course, this doesn't work (with single quotes, either, as 
> suggested for a
> similar problem on this list). I've worked around it like this:
> 
>   <% MessageResources resources =
>  
> MessageResources.getMessageResources("com.foo.bar.Resources");
>  String locale = resources.getMessage("footer_locale");
>   %>
>   ">Click here
>   
> 
> but I'd like to avoid the scriptlet. What name is the MessageResources
> object registered as in the application scope, so I can use 
> bean:define to
> get at it? Or is there another way to accomplish this without 
> using the
> scriptlet (no, I don't want to put the entire href in the 
> resource file).
> Thanks.
> -- 
> Jim Tomlinson
> [EMAIL PROTECTED]
> 

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Access to localized messages to build an href

2002-01-07 Thread Jim Tomlinson

I'm trying to get access to the MessageResources object that, according to
the docs, is an application scope bean. I need to build an href in this
manner:

   +
"/refend.html"%>">Click here
  

Of course, this doesn't work (with single quotes, either, as suggested for a
similar problem on this list). I've worked around it like this:

  <% MessageResources resources =
 MessageResources.getMessageResources("com.foo.bar.Resources");
 String locale = resources.getMessage("footer_locale");
  %>
  ">Click here
  

but I'd like to avoid the scriptlet. What name is the MessageResources
object registered as in the application scope, so I can use bean:define to
get at it? Or is there another way to accomplish this without using the
scriptlet (no, I don't want to put the entire href in the resource file).
Thanks.
-- 
Jim Tomlinson
[EMAIL PROTECTED]

--
To unsubscribe, e-mail:   
For additional commands, e-mail: