Message-ID: <1770112973.301397.1369125028782.JavaMail.firstname.lastname@example.org> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_301396_2107468192.1369125028781" ------=_Part_301396_2107468192.1369125028781 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
With the release of Jetty 6 as a light-weight embeddable web server, it = doesn't neglect handling of servlets aside from web application's presentat= ion-based java server pages (jsp). In fact, servlet is one of the foundatio= n of Jetty as a component-based infrastructure to hold and run j2ee applica= tions.
Jetty 6 ships with a bundle of servlets that interacts with the key clas= ses. Mostly they can be found in the org.mortbay.servlet package. Here is a= list of servlets playing a major role in running and maintaining the Jetty= server:
See GZIP Compression.
This class implements the Filter interface that is called by the web con= tainer. It acts as a decoder of the mulitpart/form-data stream sent by a HT= ML form that utilizes a file input item. Any files that is sent are stored = to a temporary location and there will be a file object added to the reques= t which will act as an attribute. It is made available that other values th= rough the usual getParameter API and the setCharacterEncoding mechanism is = respected when converting bytes to Strings.
This is a simple servlet which extends the abstract class HttpServlet th= at displays the code 500 error message "JSP support not configured.&qu= ot;
This is an experimental servlet which implements the Servlet interface. = It acts as an authorized servlet on behalf on another running servlet. This= seems not to be a substitute for the running servlet but provides a mirror= for the service.
Quality of Service Filter. This filter limits the number of active reque= sts to the number set by the "maxRequests" init parameter (defaul= t 10). If more requests are received, they are suspended and placed on prio= rity queues. Priorities are determined by the getPriority(ServletRequest) = method and are a value between 0 and the value given by the "maxPriori= ty" init parameter (default 10), with higher values having higher prio= rity.
This filter is ideal to prevent wasting threads waiting for slow/limited= resources such as a JDBC connection pool. It avoids the situation where a= ll of a containers thread pool may be consumed blocking on such a slow reso= urce. By limiting the number of active threads, a smaller thread pool may b= e used as the threads are not wasted waiting. Thus more memory may be avai= lable for use by the active threads.
Furthermore, this filter uses a priority when resuming waiting requests.= So that if a container is under load, and there are many requests waiting = for resources, the getPriority(ServletRequest) method is used, so that more= important requests are serviced first. For example, this filter could = be deployed with a maxRequest limit slightly smaller than the containers th= read pool and a high priority allocated to admin users. Thus regardless of= load, admin users would always be able to access the web application.
The maxRequest limit is policed by a Semaphore and the filter will wait = a short while attempting to acquire the semaphore. This wait is controlled = by the "waitMs" init parameter and allows the expense of a suspen= d to be avoided if the semaphore is shortly available. If the semaphore ca= nnot be obtained, the request will be suspended for the default suspend per= iod of the container or the valued set as the "suspendMs" init pa= rameter.
This has been replaced by the QoSFilter. Implemented by the Filter inter= face, the ThrottlingFilter servlet concern is to protect a web application = from having to handle an unmanageable load. This accounts when there is a s= erver that holds one application with standardized resource restrictions an= d with this will be controlled by lowering or limiting the size of the Thre= adPool. But when there are several applications in service or a single app = having different resource requirements to different URLs, then the Throttli= ngFilter comes in and guiding the number of requests being handled by Jetty= .
The filter has three configurable values:
This is another serlvet which also implements the Filter interface. This= forwards any servlets to the necessary welcome display of an application w= hen serviced.
Found in the org.mortbay.jetty.servlet package, this servlet implements = the ResourceFactory interface and extends the HttpServlet abstract class. T= his is the default servlet of Jetty usually mapped to / provides handling f= or static content, OPTION and TRACE methods for the=C2=A0=C2=A0=C2=A0 conte= xt. The MOVE method is allowed if PUT and DELETE are allowed.
The following initParameters are supported:
The CGI servlet class extends the abstract HttpServlet class. When the i= nit parameter is called, the cge bin directory is set with the cgibinResour= ceBase otherwise, it will default to the resource base of the context. Ther= e are three parameteres that the cgi bin is using:------=_Part_301396_2107468192.1369125028781--