The javax.servlet.http package is part of the servlet API. The relevant jars can be found in Java EE containers (such as Sun's Glassfish) or stand-alone servlet containers (like Apache's Tomcat). Essentially, these are Java web servers.
In order to compile code that depends on it, you will have to add the servlet library to your dependencies. Exactly how that is done depends on the tools you are using.
Are you building a web application? (Is the expected output a .war or .ear file?) Does the source come bundled with a build.xml
(probably an Ant build), any pom.xml
files (probably a Maven build) or any .project/.classpath
files (probably an Eclipse project)?
The scenario is this. Asp.net 1.1 having a javaapplet on a page calling a webservice. Javaapplet should detect the user preferred language in .net you do HttpContext.Current.Request.UserLanguages[0] so i asked and apparently in java the equivalent is request.getLocale();
OK, ignore what I said above. To get the Locale in an Applet, I imagine you would just use:
Locale userLocale = Locale.getDefault();
On a Java web server, you would use request.getLocale()
to pick up the user's locale from the HTTP request. Applets run on the client.