wcs
Class Servlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by wcs.Servlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class Servlet
extends javax.servlet.http.HttpServlet

web compiler service -- a servlet to run javac and compiler generator tools and return the result as an applet for local execution.

This servlet supports GET and POST with the same key/value pairs. The servlet can create pages with textareas to request the web service. It replies to requests with the results of preprocessing, with error messages, or with an applet page.

The applet page uses GET to request and delete an archive with the result of the compilation and with Applet which will spoof standard i/o.

See Also:
Serialized Form

Field Summary
protected  String applet2html
          configuration parameters from web.xml.
protected  File appletDir
          configuration parameters from web.xml.
protected  File appletJar
          configuration parameters from web.xml.
protected  Pattern appletPattern
          configuration parameters from web.xml.
protected  String appletSystem
          configuration parameters from web.xml.
protected  URL css
          configuration parameters from web.xml.
protected  boolean DEBUG
          configuration parameters from web.xml.
protected  Pattern denyPackage
          configuration parameters from web.xml.
protected  Properties env
          shared properties for the various tasks from web.xml.
protected  int expires
          configuration parameters from web.xml.
protected  String howto
          configuration parameters from web.xml.
protected  RuntimeException initException
          set by init().
protected  boolean javaEa
          configuration parameters from web.xml.
protected  URL javascript
          configuration parameters from web.xml.
protected  String jaySkeleton
          configuration parameters from web.xml.
protected  String jobs2html
          configuration parameters from web.xml.
protected  String servletBasename
          configuration parameters from web.xml.
protected  String servletDirname
          configuration parameters from web.xml.
protected  String target
          configuration parameters from web.xml.
protected  String tmpPrefix
          configuration parameters from web.xml.
protected  URL yydebug
          configuration parameters from web.xml.
 
Constructor Summary
Servlet()
           
 
Method Summary
protected static URI absolute(URI referer, String url)
          make HTTP URL absolute.
 void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          delegate to doPost(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse).
 void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          process the request, regardless of submission method.
protected static String getMessage(Throwable t)
          get message or exception name.
 void init()
          read web.xml, set initException on error.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

appletDir

protected File appletDir
configuration parameters from web.xml.

See Also:
init()

appletJar

protected File appletJar
configuration parameters from web.xml.

See Also:
init()

DEBUG

protected boolean DEBUG
configuration parameters from web.xml.

See Also:
init()

javaEa

protected boolean javaEa
configuration parameters from web.xml.

See Also:
init()

expires

protected int expires
configuration parameters from web.xml.

See Also:
init()

appletPattern

protected Pattern appletPattern
configuration parameters from web.xml.

See Also:
init()

denyPackage

protected Pattern denyPackage
configuration parameters from web.xml.

See Also:
init()

applet2html

protected String applet2html
configuration parameters from web.xml.

See Also:
init()

appletSystem

protected String appletSystem
configuration parameters from web.xml.

See Also:
init()

jaySkeleton

protected String jaySkeleton
configuration parameters from web.xml.

See Also:
init()

jobs2html

protected String jobs2html
configuration parameters from web.xml.

See Also:
init()

howto

protected String howto
configuration parameters from web.xml.

See Also:
init()

servletBasename

protected String servletBasename
configuration parameters from web.xml.

See Also:
init()

servletDirname

protected String servletDirname
configuration parameters from web.xml.

See Also:
init()

target

protected String target
configuration parameters from web.xml.

See Also:
init()

tmpPrefix

protected String tmpPrefix
configuration parameters from web.xml.

See Also:
init()

css

protected URL css
configuration parameters from web.xml.

See Also:
init()

javascript

protected URL javascript
configuration parameters from web.xml.

See Also:
init()

yydebug

protected URL yydebug
configuration parameters from web.xml.

See Also:
init()

env

protected Properties env
shared properties for the various tasks from web.xml.


initException

protected RuntimeException initException
set by init().

Constructor Detail

Servlet

public Servlet()
Method Detail

init

public void init()
read web.xml, set initException on error.

Overrides:
init in class javax.servlet.GenericServlet

doGet

public void doGet(javax.servlet.http.HttpServletRequest request,
                  javax.servlet.http.HttpServletResponse response)
           throws IOException,
                  javax.servlet.ServletException
delegate to doPost(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse).

Overrides:
doGet in class javax.servlet.http.HttpServlet
Throws:
IOException
javax.servlet.ServletException

doPost

public void doPost(javax.servlet.http.HttpServletRequest request,
                   javax.servlet.http.HttpServletResponse response)
            throws IOException,
                   javax.servlet.ServletException
process the request, regardless of submission method.

Overrides:
doPost in class javax.servlet.http.HttpServlet
Throws:
IOException
javax.servlet.ServletException

absolute

protected static URI absolute(URI referer,
                              String url)
make HTTP URL absolute.

Parameters:
referer - base for a partial URL.
url - leading http: but not http:// is ignored.

getMessage

protected static String getMessage(Throwable t)
get message or exception name.