Top Description Fields Constructors Methods
uk.ac.ed.ph.snuggletex.webapp

public final Class ASCIIMathMLUpConversionDemoServlet

extends BaseServlet
Class Inheritance
Imports
org.slf4j.Logger, .LoggerFactory, org.w3c.dom.Document, .Element, uk.ac.ed.ph.snuggletex.*, .WebPageOutputOptions.WebPageType, uk.ac.ed.ph.snuggletex.upconversion.MathMLUpConverter, uk.ac.ed.ph.snuggletex.utilities.MathMLUtilities, javax.servlet.ServletException, javax.servlet.http.HttpServletRequest, .HttpServletResponse, javax.xml.transform.Transformer, java.io.IOException

Servlet demonstrating the up-conversion process on MathML generated dynamically in the browser by ASCIIMathML.
Author
David McKain
Version
$Revision:158 $

Field Summary

Modifier and TypeField and Description
private static final String
DISPLAY_XSLT_LOCATION

Location of XSLT controlling page layout

private static Logger
logger

Logger so that we can log what users are trying out to allow us to improve things

private static final long

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected void
doGet(HttpServletRequest request, HttpServletResponse response)

Overrides javax.servlet.http.HttpServlet.doGet.

Generates initial input form with some demo JavaScript.

protected void
doPost(HttpServletRequest request, HttpServletResponse response)

Overrides javax.servlet.http.HttpServlet.doPost.

Handles the posted raw input & PMathML extracted from ASCIIMathML.

private void
generatePage(HttpServletRequest request, HttpServletResponse response, boolean isNewForm, String asciiMathInput, Element parallelMathMLElement, String parallelMathML, String pMathMLUpConverted, String cMathML, String maximaInput)

Inherited from uk.ac.ed.ph.snuggletex.webapp.BaseServlet:
chooseBestBaseWebPageOutputOptionschooseBestWebPageTypecreateMathMLSourceSerializationOptionscreateSnuggleEngineensureGetContextInitParamensureReadResourceextractMathMLElementgetStylesheetgetStylesheetCachegetStylesheetManagerisInternetExplorerisMathMLCapable

Field Detail

DISPLAY_XSLT_LOCATIONback to summary
private static final String DISPLAY_XSLT_LOCATION

Location of XSLT controlling page layout

loggerback to summary
private static Logger logger

Logger so that we can log what users are trying out to allow us to improve things

serialVersionUIDback to summary
private static final long serialVersionUID

Hides uk.ac.ed.ph.snuggletex.webapp.BaseServlet.serialVersionUID.

Constructor Detail

ASCIIMathMLUpConversionDemoServletback to summary
public ASCIIMathMLUpConversionDemoServlet()

Method Detail

doGetback to summary
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException

Overrides javax.servlet.http.HttpServlet.doGet.

Generates initial input form with some demo JavaScript.

Annotations
@Override
Exceptions
ServletException:

Doc from javax.servlet.http.HttpServlet.doGet.

if the request for the GET could not be handled

IOException:

Doc from javax.servlet.http.HttpServlet.doGet.

if an input or output error is detected when the servlet handles the GET request

doPostback to summary
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException

Overrides javax.servlet.http.HttpServlet.doPost.

Handles the posted raw input & PMathML extracted from ASCIIMathML.

Annotations
@Override
Exceptions
ServletException:

Doc from javax.servlet.http.HttpServlet.doPost.

if the request for the POST could not be handled

IOException:

Doc from javax.servlet.http.HttpServlet.doPost.

if an input or output error is detected when the servlet handles the request

generatePageback to summary
private void generatePage(HttpServletRequest request, HttpServletResponse response, boolean isNewForm, String asciiMathInput, Element parallelMathMLElement, String parallelMathML, String pMathMLUpConverted, String cMathML, String maximaInput) throws IOException, ServletException