org.jscience.sociology.forms
Class FormHandler

java.lang.Object
  extended by org.jscience.sociology.forms.FormHandler

public class FormHandler
extends java.lang.Object

This class does the form handling. It's process() method calls the validate() method of the Form instance and further on calls the appropriate method of ContentGenerator.

See Also:
Form

Constructor Summary
FormHandler()
           
 
Method Summary
 void init(javax.servlet.ServletConfig config)
          Initializes the FormHandler object.
 void process(java.lang.String formName, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
          This is a key method for this API.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormHandler

public FormHandler()
Method Detail

init

public void init(javax.servlet.ServletConfig config)
          throws javax.servlet.ServletException
Initializes the FormHandler object. This method is called by org.jscience.sociology.forms.control.FormControllerServlet.

Parameters:
config - the ServletConfig object of FormControllerServlet.
Throws:
javax.servlet.ServletException

process

public void process(java.lang.String formName,
                    javax.servlet.http.HttpServletRequest req,
                    javax.servlet.http.HttpServletResponse resp)
             throws javax.servlet.ServletException,
                    java.io.IOException
This is a key method for this API. It handles all the work for processing the form and it also calls the appropriate methods of ContentGenerator. This method is called by org.jscience.sociology.forms.control.FormControllerServlet.

Parameters:
formName - the name of the form being processed.
req - the HttpServletRequest object.
resp - the HttpServletResponse object.
Throws:
javax.servlet.ServletException - DOCUMENT ME!
java.io.IOException - DOCUMENT ME!