File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Link with html:param retrieved from localized properties Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Link with html:param retrieved from localized properties" Watch "Link with html:param retrieved from localized properties" New topic
Author

Link with html:param retrieved from localized properties

T Masga
Greenhorn

Joined: Jun 25, 2008
Posts: 6
Hi,

I'm using Struts 1.3.8 and I'm having a problem creating a localized link.

I'm using LookupDispatchAction as follows:



Then in my code I have the following:



My config:



My Properties:


Now everything works ok in english, because the link will be created with parameter "step=Search" and it will match the localized value retrieved in "getKeyMethodMap" method of the action.

Now if I change language to ES, I have a problem ... the link will still be generated as "step=Search" (it's hardcoded) but the "getKeyMethodMap" method of the action will retrieve "Busca", and so when I click, I receive an error 500:


Error 500: Action[/ScreenSearch] missing resource in key method map


So my question is, how can I use html:param with a value retrieved from localized resource properties of struts?

I mean, something like:

<html:param name="step" value="<bean:message key='jsp.screen_search.submit' />" />

So that it generates:
step=Search
step=Busca
...

At this time, language ES will generate html like:



And I need something like:





Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Link with html:param retrieved from localized properties