Tanzkurse für singles in mainz

javax servlet singlethreadmodel api

wochenspiegel er sucht sie border="0" width="100%" cellpadding="1" cellspacing="0" summary="" readability="2">


Package javax.servlet

The javax.servlet package contains a number of wochenspiegel er sucht sie classes and interfaces that describe and define the singlehoroskop steinbock juni 2015 contracts between sie sucht ihn düsseldorf quoka.de a servlet class and the runtime environment provided for an instance of such a class by a conforming servlet container.

See:
          

Interface Summary
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.
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.
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.
Implementations of this interface receive notifications of changes to the attribute list on the servlet context of a web application.
Implementations of this interface receive notifications about changes to the servlet context of the web application they are part of.
Defines an object to provide client request information to a servlet.
A ServletRequestAttributeListener can be implemented by the developer interested in being notified of request attribute changes.
A ServletRequestListener can be implemented by the developer interested in being notified of requests coming in and out of scope in a web component.
Defines an object to assist a servlet in sending a response to the client.
Deprecated. As of Java Servlet API 2.4, with no direct replacement.

 

wochenspiegel er sucht sie
Class Summary
Defines a generic, protocol-independent servlet.
This is the event class for notifications about changes to the attributes of the servlet context 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.

 

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.



Copyright © 1999-2012 The Apache Software Foundation. All Rights Reserved.

Book Home

The javax.servlet package is the core of the Servlet API. It contains the classes necessary for a standard, protocol-independent servlet. Every servlet must implement the Servlet interface in one form or another. The abstract GenericServlet class provides the framework for developing basic servlets. The package also includes a variety of utility classes that communicate with the server and the client. shows the class hierarchy of this package.

figure

Figure 25-1. The javax.servlet package

GenericServlet Servlets 1.0 sprüche über menschen kennenlernen
javax.servlet serializable

The GenericServlet class provides a basic implementation of the Servlet and ServletConfig interfaces. If you are creating a protocol-independent servlet, you probably want to subclass this class rather than implement the Servlet interface directly. Note that the service() method is declared as abstract; this is the only method you have to override to implement a generic servlet.

GenericServlet includes basic implementations of the init() and destroy() methods, which perform basic setup and cleanup tasks, respectively. The init() method that takes a ServletConfig object stores that object for later use. This means that if you override the method and fail to call the super.init(ServletConfig) method, you won't be able to use the ServletConfig methods later. In Version 2.1 of the Servlet API, you can override a no-argument version of init() that is dispatched by the default init(ServletConfig) method of GenericServlet.

public abstract class GenericServlet implements Servlet, ServletConfig, Serializable {
// Public Constructors
public ();
// Public Instance singlehoroskop steinbock juni 2015 Methods
2.1 public void () throws ServletException; empty
public void (String msg);
2.1 public void (String message, Throwable t);
// Methods implementing Servlet
public void ();
public ServletConfig ();
public String ();
public void (ServletConfig config) throws ServletException;
public abstract void (ServletRequest req, ServletResponse res) throws ServletException, IOException;
// Methods implementing ServletConfig
public String (String name);
public java.util.Enumeration ();
public ServletContext ();
}

Hierarchy: Object-->GenericServlet(Servlet,ServletConfig,Serializable)

Subclasses: javax.servlet.http.HttpServlet

RequestDispatcher Servlets 2.1
javax.servlet

RequestDispatcher allows a servlet to delegate some or all of the processing of a request to another resource on the web server. A RequestDispatcher object is retrieved by calling the getRequestDispatcher() method on the ServletContext object. The forward() method passes a request on to another servlet for processing, while the include() method includes the output of another servlet in the output of the current servlet.

public interface RequestDispatcher {
// Public Instance Methods
public abstract void (ServletRequest request, ServletResponse response) throws ServletException, IOException;
public abstract void (ServletRequest request, ServletResponse response) throws ServletException, IOException;
}

Returned By: ServletContext.getRequestDispatcher()

Servlet Servlets 1.0
javax.servlet

The Servlet interface defines the basic structure of a servlet. All servlets implement this interface, either directly or by subclassing a class that does. The interface declares the basic servlet functionality: initializing a servlet, handling client requests, and destroying a servlet.

init() is called when the servlet is first initialized. Since init() creates resources the servlet can reuse, it is guaranteed to finish executing before the servlet handles any client requests. The server calls the service() method for each client request. The servlet interacts with the client via ServletRequest and ServletResponse objects passed to service(). destroy() is called to clean up resources (such as database connections) or save state when the server shuts down. The getServletInfo() method should return a String that describes a servlet, and the getServletConfig() method should return the ServletConfig object that was passed to the init() method.

public interface Servlet {
// Public Instance Methods
public abstract void ();
public abstract ServletConfig ();
public abstract String ();
public abstract void (ServletConfig config) throws ServletException;
public abstract void (ServletRequest req, ServletResponse res) throws ServletException, IOException;
}

Implementations: GenericServlet

Passed To: UnavailableException.UnavailableException()

Returned By: ServletContext.getServlet(), UnavailableException.getServlet()

ServletConfig Servlets 1.0
javax.servlet

A ServletConfig object passes configuration information from the server to a servlet. ServletConfig supports initialization parameters (also known simply as init parameters) defined by the server administrator for a particular servlet. These parameters are accessed via the getInitParameter() and getInitParameterNames() methods. ServletConfig also includes a ServletContext object, accessible via getServletContext(), for direct interaction with the server.

public interface ServletConfig {
// Public Instance Methods
public abstract String (String name);
public abstract java.util.Enumeration ();
public abstract ServletContext ();
}

Implementations: GenericServlet

Passed To: GenericServlet.init(), Servlet.init()

Returned By: GenericServlet.getServletConfig(), Servlet.getServletConfig()

ServletContext Servlets 1.0
javax.servlet

ServletContext defines methods that allow a servlet to interact with the host server. This includes reading server-specific attributes, finding information about particular files located on the server, and writing to the server log files. If there are several virtual servers running, each one may return a different ServletContext.

Servlets can also use ServletContext to interact with other servlets loaded on the same server. In Version 1.0 of the Servlet API, this was done via the getServlets() method. In Version 2.0, getServlets() was deprecated in favor of getServlet() and getServletNames(). In Version 2.1, getServlet() and getServletNames() were both deprecated in favor of the new setAttribute() and getAttribute() methods.

public interface ServletContext {
// Public Instance Methods
public abstract Object (String name);
2.1 public abstract java.util.Enumeration ();
2.1 public abstract ServletContext (String uripath);
2.1 public abstract int ();
public abstract String (String file);
2.1 public abstract int ();
public abstract String (String path);
2.1 public abstract RequestDispatcher (String urlpath);
2.1 public abstract java.net.URL (String path) throws java.net.MalformedURLException;
2.1 public abstract java.io.InputStream (String path);
public abstract String ();
public abstract void (String msg);
2.1 public abstract void (String message, Throwable throwable);
2.1 public abstract void (String name);
2.1 public abstract void (String name, Object object);
// Deprecated Public Methods
# public abstract Servlet (String name) throws ServletException;
2.0# public abstract java.util.Enumeration ();
# public abstract java.util.Enumeration ();
2.0# public abstract void (Exception exception, String msg);
}

Returned By: GenericServlet.getServletContext(), ServletConfig.getServletContext(), ServletContext.getContext()

ServletException Servlets 1.0
javax.servlet serializable checked

A generic Exception class used for basic servlet errors. In version 2.1, a servlet can specify a Throwable root cause for this exception (using the constructors that accept Throwable parameters). The root cause can be retrieved with the getRootCause() method.

public class ServletException extends Exception {
// Public Constructors
2.0 public ();
2.1 public (Throwable rootCause);
public (String message);
2.1 public (String message, Throwable rootCause);
// Public Instance Methods
2.1 public Throwable (); default:null
}

Hierarchy: Object-->Throwable(Serializable)-->Exception-->ServletException

Subclasses: UnavailableException

Thrown By: GenericServlet.{init(), service()}, RequestDispatcher.{forward(), include()}, Servlet.{init(), service()}, ServletContext.getServlet(), javax.servlet.http.HttpServlet.{doDelete(), doGet(), doOptions(), doPost(), doPut(), doTrace(), service()}

ServletInputStream Servlets 1.0
javax.servlet

ServletInputStream provides an input stream for reading data from a client request. A servlet can get a ServletInputStream by calling the getInputStream() method of ServletRequest. While ServletInputStream does contain a readLine() method for reading textual data one line at a time, this functionality was taken over by BufferedReader objects and the getReader() method of ServletRequest in Version 2.0 of the Servlet API. Thus, ServletInputStream should be used only to read binary data, generally in the context of a filtering servlet.

public abstract class ServletInputStream extends java.io.InputStream {
// Protected Constructors
protected ();
// Public Instance Methods
public int (byte ] b, int off, int len) throws IOException;
}

Hierarchy: Object-->java.io.InputStream-->ServletInputStream

Passed To: javax.servlet.http.HttpUtils.parsePostData()

Returned By: ServletRequest.getInputStream()

ServletOutputStream Servlets 1.0
javax.servlet

ServletOutputStream provides an output stream for sending binary data back to a client. A servlet can get a ServletOutputStream by calling the getOutputStream() method of ServletResponse. ServletOutputStream was the only available output method in Version 1.0 of the Servlet API. For text and HTML output, it has been supplanted by PrintWriter objects produced by the getWriter() method of ServletResponse. The various print() and println() methods should therefore be regarded as legacies.

public abstract class ServletOutputStream extends java.io.OutputStream {
// Protected Constructors
protected ();
// Public Instance Methods
public void (long l) throws IOException;
public void (float f) throws IOException;
public void (double d) throws IOException;
public void (int i) throws IOException;
public void (String s) throws IOException;
public void (boolean b) throws IOException;
public void (char c) throws IOException;
public void () throws IOException;
public void (long l) throws IOException;
public void (float f) throws IOException;
public void (double d) throws IOException;
public void (int i) throws IOException;
public void (String s) throws IOException;
public void (boolean b) throws IOException;
public void (char c) throws IOException;
}

Hierarchy: Object-->java.io.OutputStream-->ServletOutputStream

Returned By: ServletResponse.getOutputStream()

ServletRequest Servlets 1.0
javax.servlet

A ServletRequest object encapsulates information about a client request. The server passes a ServletRequest object to the service() method of a servlet. ServletRequest provides access to request parameters, such as form values or other request-specific parameters. These are accessed using the getParameterNames(), getParameter(), and getParameterValues() methods. Raw request data can be read by the getReader() method (for textual data) and the getInputStream() method (for binary data). The getContentType(), getContentLength(), and getCharacterEncoding() methods can help retrieve this information. Other methods provide information about the client (getRemoteAddr(), getRemoteHost()), the request itself (getScheme(), getProtocol()), and the server (getServerName(), getServerPort()). Version 2.1 also adds the getAttribute() and setAttribute() methods, which are generally used with the new RequestDispatcher interface.

public interface ServletRequest {
// Public Instance Methods
public abstract Object (String name);
2.1 public abstract java.util.Enumeration ();
2.0 public abstract String ();
public abstract int ();
public abstract String ();
public abstract ServletInputStream () throws IOException;
public abstract String (String name);
public abstract java.util.Enumeration ();
public abstract String[ ] (String name);
public abstract String ();
2.0 public abstract BufferedReader () throws IOException;
public abstract String ();
public abstract String ();
public abstract String ();
public abstract String ();
public abstract int ();
2.1 public abstract void (String key, Object o);
// Deprecated Public Methods
# public abstract String (String path);
}

Implementations: javax.servlet.http.HttpServletRequest

Passed To: GenericServlet.service(), RequestDispatcher.{forward(), include()}, Servlet.service(), javax.servlet.http.HttpServlet.service()

ServletResponse Servlets 1.0
javax.servlet

The ServletResponse object sends MIME-encoded data back to the client. The interface defines a getOutputStream() method that returns a ServletOutputStream for sending binary data and a getWriter() method that returns a PrintWriter for sending textual data. The setContentType() and setContentLength() methods can explicitly set the content type and content length (often necessary for keep-alive connections and other tasks). If you call setContentType(), you should do so before you call getWriter(), as getWriter() consults the content type to determine which charset to use.

public interface ServletResponse {
// Public Instance Methods
2.0 public abstract String ();
public abstract ServletOutputStream () throws IOException;
2.0 public abstract PrintWriter () throws IOException;
public abstract void (int len);
public abstract void (String type);
}

Implementations: javax.servlet.http.HttpServletResponse

Passed To: GenericServlet.service(), RequestDispatcher.{forward(), include()}, Servlet.service(), javax.servlet.http.HttpServlet.service()

SingleThreadModel Servlets 2.0
javax.servlet

SingleThreadModel is a tag interface that tells the server to create a pool of servlet instances to serve individual requests. In this case, the server ensures that each instance of the servlet handles only one service request at a time. SingleThreadModel provides easy thread safety, but imposes performance penalties.

public interface SingleThreadModel {
}
UnavailableException Servlets 1.0
javax.servlet serializable checked

An UnavailableException indicates that a servlet is unable to handle client requests, either temporarily or permanently. To specify temporary unavailability, use the three-argument constructor and specify the duration of the servlet's downtime. If a servlet specifies temporary unavailability, the server may (but is not required to) attempt to reload the servlet after the specified interval.

public class UnavailableException extends ServletException {
// Public Constructors
public (Servlet servlet, String msg);
public (int seconds, Servlet servlet, String msg);
// Public Instance Methods
public Servlet ();
public int ();
public boolean ();
}

Hierarchy: Object-->Throwable(Serializable)-->Exception-->ServletException-->UnavailableException



Library Navigation Links

O'Reilly & Associates. All rights reserved.

The javax.servlet and javax.servlet.http packages represent interfaces and classes for servlet api.

The javax.servlet package contains many interfaces and classes that are used by the servlet or web container. These are not specific to any protocol.

The javax.servlet.http package contains interfaces and classes that are responsible for http requests only.

Let's see what are the interfaces of javax.servlet package.

Interfaces in javax.servlet package

There are many interfaces in javax.servlet package. They are as follows:

  1. Servlet
  2. ServletRequest
  3. ServletResponse
  4. RequestDispatcher
  5. ServletConfig
  6. ServletContext
  7. SingleThreadModel
  8. Filter
  9. FilterConfig
  10. FilterChain
  11. ServletRequestListener
  12. ServletRequestAttributeListener
  13. ServletContextListener
  14. ServletContextAttributeListener

Classes in javax.servlet package

There are many classes in javax.servlet package. They are as follows:

  1. GenericServlet
  2. ServletInputStream
  3. ServletOutputStream
  4. ServletRequestWrapper
  5. ServletResponseWrapper
  6. ServletRequestEvent
  7. ServletContextEvent
  8. ServletRequestAttributeEvent
  9. ServletContextAttributeEvent
  10. ServletException
  11. UnavailableException

Interfaces in javax.servlet.http package

There are many interfaces in javax.servlet.http package. They are as follows:

  1. HttpServletRequest
  2. HttpServletResponse
  3. HttpSession
  4. HttpSessionListener
  5. HttpSessionAttributeListener
  6. HttpSessionBindingListener
  7. HttpSessionActivationListener
  8. HttpSessionContext (deprecated now)

Classes in javax.servlet.http package

There are many classes in javax.servlet.http package. They are as follows:

  1. HttpServlet
  2. Cookie
  3. HttpServletRequestWrapper
  4. HttpServletResponseWrapper
  5. HttpSessionEvent
  6. HttpSessionBindingEvent
  7. HttpUtils (deprecated now)

Next Topic

Please Share

facebook twitter google plus pinterest tumbler

Learn Latest Tutorials

Software Installation on CentOSOn CentOS
Software Installation on MacOn Mac
Framework7 tutorialFramework7
Phalcon tutorialPhalcon


Zahra Doe Morbi gravida, sem non egestas ullamcorper, tellus ante laoreet nisl, id iaculis urna eros vel turpis curabitur.

3 Comments

Zahra Doejune 2, 2017
Morbi gravida, sem non egestas ullamcorper, tellus ante laoreet nisl, id iaculis urna eros vel turpis curabitur.
Zahra Doejune 2, 2017
Morbi gravida, sem non egestas ullamcorper, tellus ante laoreet nisl, id iaculis urna eros vel turpis curabitur.
Zahra Doejune 2, 2017
Morbi gravida, sem non egestas ullamcorper, tellus ante laoreet nisl, id iaculis urna eros vel turpis curabitur.

Leavy Reply

Your Name (required) Your Name (required) Your Message