org.bolson.vote
Class ElectionTestServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.bolson.vote.ElectionTestServlet
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
public class ElectionTestServlet
- extends javax.servlet.http.HttpServlet
Servlet for creating an "Election Calculator" for theortical elections or for running small elections which data has been collected for.
- See Also:
- Serialized Form
Method Summary |
VotingSystem[] |
buildVSArray(int numc,
boolean[] on)
|
void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
boolean[] |
getOnOffForReq(javax.servlet.http.HttpServletRequest request)
|
void |
init()
|
static java.lang.String |
numArrayToHtmlTable(java.lang.Object o)
|
void |
printOnOffFormPart(java.io.PrintWriter out,
boolean[] on)
|
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 |
defaultData
public static final java.lang.String defaultData
- See Also:
- Constant Field Values
ElectionTestServlet
public ElectionTestServlet()
numArrayToHtmlTable
public static java.lang.String numArrayToHtmlTable(java.lang.Object o)
init
public void init()
- Overrides:
init
in class javax.servlet.GenericServlet
getOnOffForReq
public boolean[] getOnOffForReq(javax.servlet.http.HttpServletRequest request)
printOnOffFormPart
public void printOnOffFormPart(java.io.PrintWriter out,
boolean[] on)
buildVSArray
public VotingSystem[] buildVSArray(int numc,
boolean[] on)
doGet
public void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException,
javax.servlet.ServletException
- Overrides:
doGet
in class javax.servlet.http.HttpServlet
- Throws:
java.io.IOException
javax.servlet.ServletException
doPost
public void doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException,
javax.servlet.ServletException
- Overrides:
doPost
in class javax.servlet.http.HttpServlet
- Throws:
java.io.IOException
javax.servlet.ServletException