hmmmmm......
wonder what you do first thing, google it... rather going through Java API.... okay..
enough explanation here is what we need to do to read it..
most of the time it goes in an intercepting servlet or a web filter...
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class ReadBrowserLocaleServlet extends HttpServlet {
public void doGet (HttpServletRequest req,HttpServletResponse res)
throws ServletException, IOException
{
doPost(req,res);
}
public void doPost (HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException
{
String browserLocale=req.getHeader("Accept-Language");
import javax.servlet.*;
import javax.servlet.http.*;
public class ReadBrowserLocaleServlet extends HttpServlet {
public void doGet (HttpServletRequest req,HttpServletResponse res)
throws ServletException, IOException
{
doPost(req,res);
}
public void doPost (HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException
{
String browserLocale=req.getHeader("Accept-Language");
System.out.println("Browser Locale" + browserLocale);
}
}
}
}
Let me know if you like it.... Thanks..