File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes Programmatically changing Locale in JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Programmatically changing Locale in JSP" Watch "Programmatically changing Locale in JSP" New topic

Programmatically changing Locale in JSP

Adrian Enns
Ranch Hand

Joined: Aug 11, 2004
Posts: 48
How do I programmatically change the locale in a JSP?

I've seen:

<%@ taglib prefix="fmt" uri="" %>
<fmt:setLocale value="${cookie.preferredLocale.value}" />

I'm not sure how I get this code or how I reference it in my web.xml??

Any help out there for me?
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
Refer to the Chapter 12 of this book
I agree. Here's the link:
subject: Programmatically changing Locale in JSP
It's not a secret anymore!