cmu.jspsurveymanager
Class WebApp

java.lang.Object
  extended by cmu.jspsurveymanager.WebApp

public class WebApp
extends java.lang.Object

Library class of utility methods for web applications, mostly for use inside the jsp files. (Soon it will be only for use inside the jsp files. Developed by Peter Centgraf as final project for the CMU 15-397: Web Application Development course, Spring 2004.


Constructor Summary
WebApp()
           
WebApp(DatabaseObjectStorage objectStorage)
           
 
Method Summary
static java.lang.String cleanString(java.lang.String s)
          Makes a string safe for usage in HTML and/or SQL.
static java.lang.String cleanString(java.lang.String s, java.util.regex.Pattern badCharPattern)
          Makes a string safe for usage in HTML and/or SQL.
 Admin[] getAdmins()
          Gets an array of all Admins.
 java.util.Vector<Survey> getSurveys()
          Gets an array of all Surveys.
 void kill()
          Closes the database connection to free resources.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebApp

public WebApp()

WebApp

public WebApp(DatabaseObjectStorage objectStorage)
Method Detail

cleanString

public static java.lang.String cleanString(java.lang.String s)
Makes a string safe for usage in HTML and/or SQL.


cleanString

public static java.lang.String cleanString(java.lang.String s,
                                           java.util.regex.Pattern badCharPattern)
Makes a string safe for usage in HTML and/or SQL.


kill

public void kill()
Closes the database connection to free resources.


getAdmins

public Admin[] getAdmins()
Gets an array of all Admins. Used by the java beans only -- not sure how it's looking it up, probably through reflection.


getSurveys

public java.util.Vector<Survey> getSurveys()
Gets an array of all Surveys.