com.jcorporate.expresso.services.servlet
Class DBCreate
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.jcorporate.expresso.core.servlet.StdServlet
com.jcorporate.expresso.core.servlet.DBServlet
com.jcorporate.expresso.services.servlet.DBCreate
- All Implemented Interfaces:
- Serializable, Servlet, ServletConfig
- public class DBCreate
- extends DBServlet
Servlet to initialize the database and various default items
in it. Use it as a friendly alternative to the DBTool command line
utility.
- Version:
- $Revision: 1.25 $ $Date: 2004/11/17 20:48:18 $
- Author:
- Michael Nash
- See Also:
- Serialized Form
| Methods inherited from class com.jcorporate.expresso.core.servlet.StdServlet |
getSchema, getServerName, getServerPort, getServletPrefix, getServletPrefix, getString, getString, getTitle, handleParam, setSchema, showError, showError |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DBCreate
public DBCreate()
init
public void init(ServletConfig sc)
throws ServletException
- Initialize the serv.et
- Specified by:
init in interface Servlet- Overrides:
init in class DBServlet
- Parameters:
sc - The servlet config object given to us by the servlet container
- Throws:
ServletException
doGet
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException,
IOException
- doGet method presents a form allowing the user to select several
intialize options
- Overrides:
doGet in class DBServlet
- Parameters:
request - Standard request objectresponse - Standard response object
- Throws:
ServletException - If an uncaught exception occurrs
IOException - If an I/O error occurrs communicating with
the client
doPost
public void doPost(HttpServletRequest request,
HttpServletResponse response)
throws ServletException,
IOException
- doPost receives the options from the form & calls methods to actually
perform the intiailizations
- Overrides:
doPost in class DBServlet
- Parameters:
request - Standard request objectresponse - Standard reponse object
- Throws:
ServletException - If an uncaught exception occurrs
IOException - If an I/O error occurrs communicating with
the client
isInitialDatabaseCreated
protected boolean isInitialDatabaseCreated()
- Checks to see if a database of any sort has already been created in
the default context.
- Returns:
- True if the schemalist object exists in the system
isAdmin
protected boolean isAdmin(HttpServletRequest request,
HttpServletResponse response)
throws ServletException
- Checks to see if the current user is an Admin.
- Parameters:
request - The ServletRequest objectresponse - The Servlet Response object
- Returns:
- true if the CurrentLogin is an Admin User
- Throws:
ServletException - if there's an error processing the request
Please see www.jcorporate.com for information about new Expresso releases.