wood burning stoves 2.0*
The moose likes Struts and the fly likes Where are tlds for struts 2.0.11 ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Where are tlds for struts 2.0.11 ?" Watch "Where are tlds for struts 2.0.11 ?" New topic
Author

Where are tlds for struts 2.0.11 ?

Tauri Valor
Ranch Hand

Joined: Aug 03, 2005
Posts: 166
I couldnt find tlds for Struts2.0.11, which were there in the previous versions. eg. struts-bean.tld ..

Pls let me know if theres any turnaround in new version..


A Moment's insight is sometimes worth a Life's experience.
Tauri Valor
Ranch Hand

Joined: Aug 03, 2005
Posts: 166
I was trying internationalisation with Struts 2 using tiles.
Is there any other way to implement internationalisation?
Joachim Rohde
Ranch Hand

Joined: Nov 27, 2006
Posts: 423

For i18n look at http://struts.apache.org/2.x/docs/localization.html
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
In Struts 2, all Struts custom tags are in one TLD. None of the Struts 1 tags will work with Struts 2, nor are they needed.


Merrill
Consultant, Sima Solutions
Tauri Valor
Ranch Hand

Joined: Aug 03, 2005
Posts: 166
Thanks for the info..

Im trying to use internationalisation using Struts2.

My jsp looks like this:




Im using tiles..
In the output I couldnt get the value of the key "welcome" from the ApplicationResources_en_US.properties .

Instead I get "welcome" printed on the screen.

My console prints the following :

2008-Jan-16 10:16:10,671 - DEBUG com.opensymphony.xwork2.util.InstantiatingNullHandler - Entering nullMethodResult
2008-Jan-16 10:16:10,671 - DEBUG com.opensymphony.xwork2.util.LocalizedTextUtil - Unable to find text for key 'welcome' in class 'com.opensymphony.xwork2.ActionSupport' and locale 'en_US'
2008-Jan-16 10:16:10,671 - DEBUG com.opensymphony.xwork2.util.InstantiatingNullHandler - Entering nullPropertyValue [target=[com.opensymphony.xwork2.ActionSupport@fa0094, com.opensymphony.xwork2.DefaultTextProvider@4adb34], property=org]
2008-Jan-16 10:16:10,671 - DEBUG com.opensymphony.xwork2.interceptor.I18nInterceptor - after Locale=en_US
2008-Jan-16 10:16:10,671 - DEBUG com.opensymphony.xwork2.interceptor.I18nInterceptor - intercept }




Please help me understand...
selvaraju sellamuthu
Ranch Hand

Joined: Jun 28, 2007
Posts: 53
Simple hlloworld example used Internalization.Take a look at this below link.and download a sample login,hello world application.
look at here
Tauri Valor
Ranch Hand

Joined: Aug 03, 2005
Posts: 166
Thanks for the link !!

I tried out the example but it couldnt locate my properties file, there fore displays the strings in my jsp...

Where exactly should I place my properties ?

How does struts know the location of properties file ?
Joachim Rohde
Ranch Hand

Joined: Nov 27, 2006
Posts: 423

Once again: http://struts.apache.org/2.x/docs/localization.html
Tauri Valor
Ranch Hand

Joined: Aug 03, 2005
Posts: 166
I got it working...

Thanks all.

I've learned the following:

Struts2 automatically locates and calls the properties files without configuring anywhere.

Unlike previous versions of Struts, the present version has only one integrated tld which does most of the work done by the bunch of previous tlds.

I can send you the example if anybody needs .

Thanks
Ankur Srivastav
Ranch Hand

Joined: Aug 31, 2009
Posts: 57

Hi,

Can you send the example, I am facing problems as I am using Struts Portal Bridge and my application is in Struts2. So its giving parsing errors for TLD and all.

Any help will be greatly appreciated.

Thanks..


Sun Certified Java Programmer v 1.4
Oracle Certified Associate, Java SE 7 Programmer
JEE 5 Web Component Developer Certified Professional
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61661
    
  67

"Ankur Sr", please check your private messages for an important administrative matter.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Where are tlds for struts 2.0.11 ?