gs
Class Servlet

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

Deprecated. Replaced by Servlet.

public class Servlet
extends javax.servlet.http.HttpServlet

servlet to run jag and javac from tomcat and return the result as an applet for local execution.

This servlet supports GET and POST with the same key/value pairs. The servlet creates a page with defaults to request the web service and replies to this page with error messages or with an applet.

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

applet basename of a temporary jar file for an applet which will be deleted. Takes precedence over all other key/value pairs.
jag preprocess, if value starts with t.
javac compile, if value starts with t.
referer URL to resolve a partial url; taken from the header value sent by the browser (which does not exist for file:).
jag.source URL or input text for jag. A partial URL is relative to referer. Only HTTP is supported. Must be in the same package as javac.source. Should contain a main method.
javac.source URLs or input text for javac. Partial URLs are relative to referer. Only HTTP is supported. System is spoofed in this package.

See Also:
Serialized Form

Field Summary
protected  File appletJar
          Deprecated. jar from which applet jar is created.
protected  String appletPattern
          Deprecated. pattern to validate applet value.
protected  String appletPrefix
          Deprecated. prepended to applet value to create path to jar.
protected  String appletSource
          Deprecated. source file for applet.
protected  Properties env
          Deprecated. shared properties for the various tasks.
protected  int expire
          Deprecated. expiration intervall for archive in milliseconds.
protected  String jagUrl
          Deprecated. URLs of jag and Java code for example, maybe empty.
protected  String javacUrl
          Deprecated. URLs of jag and Java code for example, maybe empty.
protected  String servletBasename
          Deprecated. servlet's name.
protected  String servletDirname
          Deprecated. servlet's context path.
static ResourceBundle templates
          Deprecated. MessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition) templates to generate output.
static String tmpPrefix
          Deprecated. prefix for temporary file/directory names.
 
Constructor Summary
Servlet()
          Deprecated.  
 
Method Summary
protected  URI absolute(String url, String referer)
          Deprecated. make URL absolute.
 void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Deprecated. process the request, regardless of submission method.
 void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Deprecated.  
protected static String format(String key, Object[] args)
          Deprecated. format a string from the resource file.
protected  int getInitParameter(String key, int dflt)
          Deprecated. return dflt or init-param.
protected  String getInitParameter(String key, String dflt)
          Deprecated. return dflt or init-param.
 void init()
          Deprecated. read web.xml.
protected static void print(PrintWriter out, String key, Object[] args)
          Deprecated. print a formatted string from the resource file.
 
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

templates

public static final ResourceBundle templates
Deprecated. 
MessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition) templates to generate output.


tmpPrefix

public static final String tmpPrefix
Deprecated. 
prefix for temporary file/directory names.

See Also:
Constant Field Values

env

protected Properties env
Deprecated. 
shared properties for the various tasks.


appletPattern

protected String appletPattern
Deprecated. 
pattern to validate applet value.


appletPrefix

protected String appletPrefix
Deprecated. 
prepended to applet value to create path to jar. This usually points to the server's temporary directory.


appletJar

protected File appletJar
Deprecated. 
jar from which applet jar is created. This contains jay.yydebug and the runtime for jag.


appletSource

protected String appletSource
Deprecated. 
source file for applet. This contains System in the default package.


servletDirname

protected String servletDirname
Deprecated. 
servlet's context path.


servletBasename

protected String servletBasename
Deprecated. 
servlet's name.


expire

protected int expire
Deprecated. 
expiration intervall for archive in milliseconds. This is not zero because the archive is deleted upon first access.


jagUrl

protected String jagUrl
Deprecated. 
URLs of jag and Java code for example, maybe empty.


javacUrl

protected String javacUrl
Deprecated. 
URLs of jag and Java code for example, maybe empty.

Constructor Detail

Servlet

public Servlet()
Deprecated. 
Method Detail

init

public void init()
Deprecated. 
read web.xml.

Overrides:
init in class javax.servlet.GenericServlet

doPost

public void doPost(javax.servlet.http.HttpServletRequest request,
                   javax.servlet.http.HttpServletResponse response)
            throws IOException,
                   javax.servlet.ServletException
Deprecated. 
Overrides:
doPost in class javax.servlet.http.HttpServlet
Throws:
IOException
javax.servlet.ServletException

doGet

public void doGet(javax.servlet.http.HttpServletRequest request,
                  javax.servlet.http.HttpServletResponse response)
           throws IOException,
                  javax.servlet.ServletException
Deprecated. 
process the request, regardless of submission method. Replies with request page, compilation report, or applet page.

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

absolute

protected URI absolute(String url,
                       String referer)
                throws RuntimeException
Deprecated. 
make URL absolute.

Throws:
RuntimeException - if not possible.

getInitParameter

protected int getInitParameter(String key,
                               int dflt)
Deprecated. 
return dflt or init-param.


getInitParameter

protected String getInitParameter(String key,
                                  String dflt)
Deprecated. 
return dflt or init-param.


format

protected static String format(String key,
                               Object[] args)
Deprecated. 
format a string from the resource file.

Parameters:
args - can be null if none.

print

protected static void print(PrintWriter out,
                            String key,
                            Object[] args)
Deprecated. 
print a formatted string from the resource file.

Parameters:
args - can be null if none.