Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Locale wise 301 redirect in jsp

 
Nids Arora
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a site which has many locales, with locale path as US/en, FR/fr, CH/de ,/DE/de etc. I want to have code like if the locale is FR/fr then user should be redirected to france site and if US/en then to english site. Please provide me the code for it. so i can redirect from my home page to the respective URL's.
 
Maximus Moothiringus
Ranch Hand
Posts: 46
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Isn't this what Internationalization and localization is for?
 
Nids Arora
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you please provide me with the code.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34973
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See this tutorial both for understand and sample code.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65227
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In a JSP page you will use the services of the JSTL's fmt library of tags.
 
Nids Arora
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeanee Thanks for your help!!
 
Maximus Moothiringus
Ranch Hand
Posts: 46
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Great Tutorial Jeanne!!
The TOC and the really big index in that led me to some other tutorials which I never knew was there and which I very badly needed. Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic