This week's book giveaway is in the Design and Architecture forum.
We're giving away four copies of Communication Patterns: A Guide for Developers and Architects and have Jacqui Read on-line!
See this thread for details.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

internationalization in jsp

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
am working on a JSP which has static content hardcoded into it
I wanna replace that static content,so i have kept the messages into the properties file.
eg:in the properties file
equipments.text.compatible_equipment= compatible equipments
and now I have crfeated an Interface in Java and declared constanstants equating to these keys
eg
public static final String EQUIPMENT_COMPATIBLE="equipments.text.compatible_equipment";

now in the jsp page;
I'm importing the interface

eg:
the existing page contains:

<b>Compatible equipments</b>

I want to have something like this

<b><bean:message key="<%=interfacename.EQUIPMENT_COMPATIBLE%>" /></b>


but my problem is
even after importing struts-bean
the tag is not working
i have placed the properties file and the interface in the required place acc to my application

so can i use <c ut> tag :if so how can it be implemented in the given scenario


or can i use <fmt:message tag>
and does this work with the resource bundles
which i am using with the struts-bean tld in my other pages


have more doubt..if i'm using struts framework,then can i use the JSTL tag library for the internationalization,i mean if i have defines all the messages in a property file of my application
and if for only one page i wanna use the jstl..to internationaliza the static content
is this possible

thanks in advance
 
Sheriff
Posts: 67750
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"jazzy",

We're pleased to have you here with us on the Ranch, but there are a few rules that need to be followed, and one is that proper names are required. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
Forum Bartender
 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, you can do i18n with JSTL, Struts, Whatever.
you only need read documentation.
 
Weeds: because mother nature refuses to be your personal bitch. But this tiny ad is willing:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic