com.eteks.servlet
Class TeksSurveyPie
java.lang.Object
|
+--javax.servlet.GenericServlet
|
+--javax.servlet.http.HttpServlet
|
+--com.eteks.awt.servlet.PJAServlet
|
+--com.eteks.servlet.TeksSurveyPie
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
- public class TeksSurveyPie
- extends PJAServlet
This servlet manages in a simple way a dynamic survey and returns the pie of the survey.
It can be called in either ways :
.../servlet/com.eteks.servlet.TeksSurveyPie?survey=mySurvey&answer=myAnswer
adds the answer myAnswer
to the survey mySurvey
,
and then returns the pie of the current state of mySurvey
.
.../servlet/com.eteks.servlet.TeksSurveyPie?survey=mySurvey
simply returns the pie of the current state of mySurvey
.
To be platform independant, the servlet uses com.eteks.awt.servlet.PJAServlet
as super class,
to have at disposal an image into which graphics operation can be performed.
com.eteks.awt.PJAServlet
class and depending classes of com.eteks.awt
packages
must be in the servlet engine classpath, and at least one .pjaf font file (Pure Java AWT Font) must exist
in the user directory or in the directory set in the java.awt.fonts
system property,
if JVM version <= 1.1.
- Since:
- PJA1.0
- Version:
- 2.1
- Author:
- Emmanuel Puybaret
- See Also:
PJAServlet
, Serialized Form
Method Summary |
void |
destroyPJA()
Override this method instead of the final method destroy () .
|
void |
doGetPJA(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Override this method instead of the final method doGet () .
|
void |
doPostPJA(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Override this method instead of the final method doPost () .
|
java.lang.String |
getFontsPath()
Override this method to return the fonts path where .pjaf files (JDK 1.1)
or True Type files (JDK >= 1.2) can be found. |
void |
initPJA(javax.servlet.ServletConfig config)
Override this method instead of the final method init (ServletConfig config) .
|
void |
sendGIFImage(java.awt.Image image,
javax.servlet.http.HttpServletResponse response)
Generates a GIF image on the response stream from image. |
Methods inherited from class com.eteks.awt.servlet.PJAServlet |
createImage, destroy, doDelete, doDeletePJA, doGet, doOptions, doOptionsPJA, doPost, doPut, doPutPJA, doTrace, doTracePJA, getServletInfo, getServletInfoPJA, getSystemProperty, getUserHomeDir, init, init, initPJA, isDefaultToolkitAvailable, service, service, servicePJA, servicePJA, testDefaultToolkit |
Methods inherited from class javax.servlet.http.HttpServlet |
getLastModified |
Methods inherited from class javax.servlet.GenericServlet |
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, log, log |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TeksSurveyPie
public TeksSurveyPie()
initPJA
public void initPJA(javax.servlet.ServletConfig config)
throws javax.servlet.ServletException
- Description copied from class:
PJAServlet
- Override this method instead of the final method
init (ServletConfig config)
.
PJAServlet
implementation calls super.init (config)
.
- Overrides:
initPJA
in class PJAServlet
destroyPJA
public void destroyPJA()
- Description copied from class:
PJAServlet
- Override this method instead of the final method
destroy ()
.
PJAServlet
implementation calls super.destroy ()
.
- Overrides:
destroyPJA
in class PJAServlet
getFontsPath
public java.lang.String getFontsPath()
- Description copied from class:
PJAServlet
- Override this method to return the fonts path where .pjaf files (JDK 1.1)
or True Type files (JDK >= 1.2) can be found. If you want to return more than one
directory separate them with
File.pathSeparator
.
Note : This method is called from within PJAServlet
constructor.
- Overrides:
getFontsPath
in class PJAServlet
- Following copied from class:
com.eteks.awt.servlet.PJAServlet
- Returns:
PJAServlet
implementation returns "."
+ File.pathSeparator + getSystemProperty ("user.dir")
+ File.pathSeparator + getSystemProperty ("java.home")
doPostPJA
public void doPostPJA(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
- Description copied from class:
PJAServlet
- Override this method instead of the final method
doPost ()
.
PJAServlet
implementation calls super.doPost ()
.
- Overrides:
doPostPJA
in class PJAServlet
doGetPJA
public void doGetPJA(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
- Description copied from class:
PJAServlet
- Override this method instead of the final method
doGet ()
.
PJAServlet
implementation calls super.doGet ()
.
- Overrides:
doGetPJA
in class PJAServlet
sendGIFImage
public void sendGIFImage(java.awt.Image image,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
- Generates a GIF image on the response stream from image.