Public abstract interface ServletRequest. Defines a servlet engine generated object that enables a servlet to get information about a client request. Some of the data provided by the ServletRequest object includes parameter names and values, attributes, and an input stream.
A bit more detail to Joachim Sauer's answer: On Ubuntu at least, the metapackage tomcat6 depends on metapackage tomcat6-common (and others), which depends on metapackage libtomcat6-java, which depends on package libservlet2.5-java (and others). It contains, among others, the files /usr/share/java/servlet-api-2.5.jar and /usr/share/java/jsp-api-2.1.jar, which are the servlet and JSP libraries you need. So if you've installed Tomcat 6 through apt-get or the Ubuntu Software Centre, you already have the libraries; all that's left is to get Tomcat to use them in your project.
Place libraries /usr/share/java/servlet-api-2.5.jar and /usr/share/java/jsp-api-2.1.jar on the class path like this:. For all projects, by configuring Eclipse by selecting Window - Preferences - Java - Installed JREs, then selecting the JRE you're using, pressing Edit, then pressing Add External JARs, and then by selecting the files from the locations given above. For just one project, by right-clicking on the project in the Project Explorer pane, then selecting Properties - Java Build Path, and then pressing Add External JARs, and then by selecting the files from the locations given above. Further note 1: These are the correct versions of those libraries for use with Tomcat 6; for the other Tomcat versions, see the table on page, though I would suppose each Tomcat version includes the versions of these libraries that are appropriate for it. Further note 2: Package libservlet2.5-java's description ( dpkg-query -s libservlet2.5-java) says: 'Apache Tomcat implements the Java Servlet and the JavaServer Pages (JSP) specifications from Sun Microsystems, and provides a 'pure Java' HTTP web server environment for Java code to run. This package contains the Java Servlet and JSP library.' The normal procedure with Eclipse and Java EE webapplications is to install a servlet container (Tomcat, Jetty, etc) or application server (Glassfish (which is bundled in the 'Sun Java EE' download), JBoss AS, WebSphere, Weblogic, etc) and integrate it in Eclipse using a (builtin) plugin in the Servers view.
During the creation wizard of a new Dynamic Web Project, you can then pick the integrated server from the list. If you happen to have an existing Dynamic Web Project without a server or want to change the associated one, then you need to modify it in the Targeted Rutimes section of the project's properties. Either way, Eclipse will automatically place the necessary server-specific libraries in the project's classpath (buildpath). You should absolutely in no way extract and copy server-specific libraries into /WEB-INF/lib or even worse the JRE/lib yourself, to 'fix' the compilation errors in Eclipse. It would make your webapplication tied to a specific server and thus completely unportable.
Javax.servlet (Java EE 6 ) Package Class Package javax.servlet The javax.servlet package contains a number of classes and interfaces that describe and define the contracts between a servlet class and the runtime environment provided for an instance of such a class by a conforming servlet container. See: Interface Summary Class representing the execution context for an asynchronous operation that was initiated on a ServletRequest. Listener that will be notified in the event that an asynchronous operation initiated on a ServletRequest to which the listener had been added has completed, timed out, or resulted in an error. A filter is an object that performs filtering tasks on either the request to a resource (a servlet or static content), or on the response from a resource, or both.
A FilterChain is an object provided by the servlet container to the developer giving a view into the invocation chain of a filtered request for a resource. A filter configuration object used by a servlet container to pass information to a filter during initialization. Interface through which a Filter may be further configured. Interface through which a Filter registered via one of the addFilter methods on ServletContext may be further configured. Interface through which a Servlet or Filter may be further configured. Interface through which a Servlet or Filter registered via one of the addServlet or addFilter methods, respectively, on ServletContext may be further configured. Defines an object that receives requests from the client and sends them to any resource (such as a servlet, HTML file, or JSP file) on the server.
Defines methods that all servlets must implement. A servlet configuration object used by a servlet container to pass information to a servlet during initialization.
Interface which allows a library/runtime to be notified of a web application's startup phase and perform any required programmatic registration of servlets, filters, and listeners in response to it. Defines a set of methods that a servlet uses to communicate with its servlet container, for example, to get the MIME type of a file, dispatch requests, or write to a log file. Interface for receiving notification events about ServletContext attribute changes.
Interface for receiving notification events about ServletContext lifecycle changes. Interface through which a Servlet may be further configured.
Interface through which a Servlet registered via one of the addServlet methods on ServletContext may be further configured. Defines an object to provide client request information to a servlet. Interface for receiving notification events about ServletRequest attribute changes. Interface for receiving notification events about requests coming into and going out of scope of a web application. Defines an object to assist a servlet in sending a response to the client. Class that may be used to configure various properties of cookies used for session tracking purposes.
Deprecated. As of Java Servlet API 2.4, with no direct replacement. Class Summary Event that gets fired when the asynchronous operation initiated on a ServletRequest (via a call to ServletRequest#startAsync or ServletRequest#startAsync(ServletRequest, ServletResponse)) has completed, timed out, or produced an error. Defines a generic, protocol-independent servlet. Java Class representation of an HttpConstraint annotation value.
Java Class represntation of an HttpMethodConstraint annotation value. Java Class represntation of an MultipartConfig annotation value. Event class for notifications about changes to the attributes of the ServletContext of a web application. This is the event class for notifications about changes to the servlet context of a web application. Provides an input stream for reading binary data from a client request, including an efficient readLine method for reading data one line at a time. Provides an output stream for sending binary data to the client.
This is the event class for notifications of changes to the attributes of the servlet request in an application. Events of this kind indicate lifecycle events for a ServletRequest. Provides a convenient implementation of the ServletRequest interface that can be subclassed by developers wishing to adapt the request to a Servlet. Provides a convenient implementation of the ServletResponse interface that can be subclassed by developers wishing to adapt the response from a Servlet.
Java Class represntation of a ServletSecurity annotation value. Enum Summary Enumeration of filter dispatcher types. Enumeration of session tracking modes. Exception Summary Defines a general exception a servlet can throw when it encounters difficulty.
Defines an exception that a servlet or filter throws to indicate that it is permanently or temporarily unavailable. Package javax.servlet Description The javax.servlet package contains a number of classes and interfaces that describe and define the contracts between a servlet class and the runtime environment provided for an instance of such a class by a conforming servlet container. Package Class Copyright © 2009-2011, Oracle Corporation and/or its affiliates. All Rights Reserved. Use is subject to Generated on 10-February-2011 12:41 Scripting on this page tracks web page traffic, but does not change the content in any way.