org.wcb.plugins.beans
Class StartAliceWeb

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended byorg.wcb.plugins.beans.StartAliceWeb
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class StartAliceWeb
extends javax.servlet.http.HttpServlet

Copyright (C) 1999 Walter Bogaardt This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 Project: Home Automation Interface Filename: $Id: StartAliceWeb.java,v 1.5 2004/01/02 21:02:57 wbogaardt Exp $ Abstract: Start up action servlet for web interface. $Log: StartAliceWeb.java,v $ Revision 1.5 2004/01/02 21:02:57 wbogaardt removed excessive logging statements, and consolidated some variables Revision 1.4 2003/12/12 23:17:36 wbogaardt javadoc comments refactored methods so they are more descriptive Revision 1.3 2003/12/10 21:06:53 wbogaardt modules page adds but does not reload from saved state Revision 1.2 2003/12/09 23:11:42 wbogaardt C: ---------------------------------------------------------------------- Revision 1.1 2003/12/09 17:20:53 wbogaardt startup servlet for web application

See Also:
Serialized Form

Constructor Summary
StartAliceWeb()
           
 
Method Summary
 void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Respond to a GET request for the content produced by this servlet.
 void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 java.lang.String getRealpath(java.lang.String relativePath)
          Pass in a string of a path directory and this will return the entire path up to that directory point for example.
 java.net.URL getUrl(java.lang.String relativePath)
          Pass in a string of a path directory and this will return the entire path up to that directory point for example.
 void init()
          Servlet initialization method starts the basic services needed for the Alice web interface.
 
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
 

Constructor Detail

StartAliceWeb

public StartAliceWeb()
Method Detail

doGet

public void doGet(javax.servlet.http.HttpServletRequest request,
                  javax.servlet.http.HttpServletResponse response)
           throws java.io.IOException,
                  javax.servlet.ServletException
Respond to a GET request for the content produced by this servlet.

Parameters:
request - The servlet request we are processing
response - The servlet response we are producing
Throws:
java.io.IOException - if an input/output error occurs
javax.servlet.ServletException - if a servlet error occurs

doPost

public void doPost(javax.servlet.http.HttpServletRequest request,
                   javax.servlet.http.HttpServletResponse response)
            throws java.io.IOException,
                   javax.servlet.ServletException
Throws:
java.io.IOException
javax.servlet.ServletException

init

public void init()
          throws javax.servlet.ServletException
Servlet initialization method starts the basic services needed for the Alice web interface. This also passes the servlet context so that a path to the web application can be maintained during runtime deployment of a war file.

Throws:
javax.servlet.ServletException

getUrl

public java.net.URL getUrl(java.lang.String relativePath)
Pass in a string of a path directory and this will return the entire path up to that directory point for example. A string of "/WEB-INF/" running in this application will return back a C:/bea/wlserver6.1/config/application/aliceweb/WEB-INF

Parameters:
relativePath - Directory name
Returns:
Url of servlet context path.

getRealpath

public java.lang.String getRealpath(java.lang.String relativePath)
Pass in a string of a path directory and this will return the entire path up to that directory point for example. A string of "/WEB-INF/" running in this application will return back a C:/bea/wlserver6.1/config/application/aliceweb/WEB-INF

Parameters:
relativePath - Directory name
Returns:
string of servlet context path


Copyright © 1999-2004 Walter Bogaardt. All Rights Reserved.