All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class org.w3c.css.servlet.CssValidator

java.lang.Object
   |
   +----javax.servlet.GenericServlet
           |
           +----javax.servlet.http.HttpServlet
                   |
                   +----org.w3c.css.servlet.CssValidator

public final class CssValidator
extends HttpServlet
This class is a servlet to use the validator.


Constructor Index

 o CssValidator()
Create a new CssValidator.

Method Index

 o doGet(HttpServletRequest, HttpServletResponse)
Performs the HTTP GET operation.
 o doPost(HttpServletRequest, HttpServletResponse)
Performs the HTTP POST operation.
 o init(ServletConfig)
Initializes the servlet and logs the initialization.

Constructors

 o CssValidator
 public CssValidator()
Create a new CssValidator.

Methods

 o init
 public void init(ServletConfig config) throws ServletException
Initializes the servlet and logs the initialization. The init method is called once, automatically, by the network service each time it loads the servlet. It is guaranteed to finish before any service requests are accepted. On fatal initialization errors, an UnavailableException should be thrown. Do not call the method System.exit.

The init method stores the ServletConfig object. Servlet writers who specialize this method should call either super.init, or store the ServletConfig object themselves. If an implementor decides to store the ServletConfig object in a different location, then the getServletConfig method must also be overridden.

Init parameters:
debug
true if you want to be in debug mode.
aural
true if you want to be in aural mode.
import
false if you don't want to activate the import statement. For security reasons, you shoud be careful when you lunch the servlet on a HTTP server with special access authorization.
input
html if the user have an HTML input or xml otherwise. deprecated

Parameters:
config - servlet configuration information.
Throws: ServletException
if a servlet exception has occurred.
Overrides:
init in class GenericServlet
 o doGet
 public void doGet(HttpServletRequest req,
                   HttpServletResponse res) throws ServletException, IOException
Performs the HTTP GET operation. An HTTP BAD_REQUEST error is reported if an error occurs. This servlet writers shouldn't set the headers for the requested entity (content type and encoding).

Note that the GET operation is expected to be safe, without any side effects for which users might be held responsible. For example, most form queries have no side effects. Requests intended to change stored data should use some other HTTP method. (There have been cases of significant security breaches reported because web-based applications used GET inappropriately.)

The GET operation is also expected to be idempotent, meaning that it can safely be repeated. This is not quite the same as being safe, but in some common examples the requirements have the same result. For example, repeating queries is both safe and idempotent (unless payment is required!), but buying something or modifying data is neither safe nor idempotent.

Forms parameters:
URL
the URL to be parsed.
submitURL
if the user want to parse an URL.
text
The text to be parsed.
submitTEXT
if the user want to parse the text.
output
HTML if the user want an HTML output or XML otherwise.
input
HTML if the user have an HTML input or XML otherwise.

Parameters:
req - encapsulates the request to the servlet.
resp - encapsulates the response from the servlet.
Throws: ServletException
if the request could not be handled.
Throws: IOException
if detected when handling the request.
Overrides:
doGet in class HttpServlet
See Also:
StyleSheetGenerator
 o doPost
 public void doPost(HttpServletRequest req,
                    HttpServletResponse res) throws ServletException, IOException
Performs the HTTP POST operation. An HTTP BAD_REQUEST error is reported if an error occurs. The headers that are set should include content type, length, and encoding. Setting content length allows the servlet to take advantage of HTTP "connection keep alive". If content length can not be set in advance, the performance penalties associated with not using keep alives will sometimes be avoided if the response entity fits in an internal buffer. The servlet implementor must write the headers before the response data because the headers can be flushed at any time after the data starts to be written.

This method does not need to be either "safe" or "idempotent". Operations requested through POST could be ones for which users need to be held accountable. Specific examples including updating stored data or buying things online.

Forms parameters:
file
The input file to be parsed.
output
The format output.
input
HTML if the user have an HTML input or XML otherwise.

Parameters:
req - encapsulates the request to the servlet
resp - encapsulates the response from the servlet
Throws: ServletException
if the request could not be handled
Throws: IOException
if detected when handling the request
Overrides:
doPost in class HttpServlet
See Also:
StyleSheetGenerator

All Packages  Class Hierarchy  This Package  Previous  Next  Index