Main Page | Packages | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

WebServer.java

00001 /*
00002  * OpenMobileIS - a free Java(TM) Framework for mobile applications Java(TM)
00003  * Copyright (C) 2004-2006 Philippe Delrieu
00004  * All rights reserved.
00005  * Contact: pdelrieu@openmobileis.org
00006  *
00007  * This library is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU Lesser General Public
00009  * License as published by the Free Software Foundation; either
00010  * version 2.1 of the License, or any later version.
00011  *
00012  * This library is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015  * Lesser General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Lesser General Public
00018  * License along with this library; if not, write to the Free Software
00019  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
00020  * USA
00021  *
00022  *  Author : Philippe Delrieu
00023  *  
00024  *  Modifications :
00025  *  2004 Creation P.Delrieu
00026  *  2004 Modified by Romain Beaugrand
00027  * 
00028  */
00029 
00030 package org.openmobileis.embedded.webserver;
00031 
00032 import java.io.DataInputStream;
00033 import java.io.File;
00034 import java.io.FileInputStream;
00035 import java.io.IOException;
00036 import java.io.InputStream;
00037 import java.net.MalformedURLException;
00038 import java.net.ServerSocket;
00039 import java.net.Socket;
00040 import java.net.URL;
00041 import java.util.Enumeration;
00042 import java.util.Hashtable;
00043 import java.util.Properties;
00044 import java.util.StringTokenizer;
00045 import java.util.Vector;
00046 
00047 import javax.servlet.RequestDispatcher;
00048 import javax.servlet.Servlet;
00049 import javax.servlet.ServletContext;
00050 import javax.servlet.ServletException;
00051 import javax.servlet.ServletRequest;
00052 import javax.servlet.ServletResponse;
00053 
00054 import org.openmobileis.common.context.ApplicationContextManager;
00055 import org.openmobileis.common.context.Plateform;
00056 import org.openmobileis.common.context.SessionContextManager;
00057 import org.openmobileis.common.util.PropertiesManager;
00058 import org.openmobileis.common.util.file.FileUtilities;
00059 import org.openmobileis.common.util.log.LogManager;
00060 import org.openmobileis.common.util.log.LogServices;
00061 import org.openmobileis.embedded.util.SystemAPI;
00062 
00063 public class WebServer implements ServletContext, RequestDispatcher {
00064     
00065     private final static int DEFAULT_PORT = 8080;
00066     
00067     private ServerThreadPool connexionPool;
00068     
00069     protected PathTreeDictionary registry;
00070     // loaded servlets : ClassName -> servlet instance
00071     private Hashtable servlets = new Hashtable();
00072     
00073     private Hashtable attributes;
00074     
00075     boolean running = true;
00076     private ServerSocket serverSocket;
00077     protected String hostName;
00078     protected int port = DEFAULT_PORT;
00079     
00080     private static Properties webserverProps;
00081     
00082     // path for properties
00083     public static String servletFile = "";
00084     public static String installPath = "";
00085 
00086     
00088     
00089     public WebServer() {
00090         this(System.getProperty("user.dir"));
00091     }
00092     
00093     public WebServer(String pathToConfFile) {
00094         System.setProperty("user.dir", pathToConfFile);
00095         try {
00096             if (pathToConfFile != null) {
00097                 webserverProps = PropertiesManager.getManager().getPropertiesFromPath(pathToConfFile+File.separator+"WEB-INF"+File.separator+"conf"+java.io.File.separator+"properties"+java.io.File.separator+"webserver.properties");
00098             } else {
00099                 webserverProps = PropertiesManager.getManager().getPropertiesFromPath("properties"+java.io.File.separator+"webserver.properties");
00100             }
00101             
00102         } catch (Exception ex) {
00103             System.out.println("Unable to find webserver.properties !!\nexit(1)");
00104             System.exit(1);
00105         }
00106         String strPort = webserverProps.getProperty("port");
00107         if (strPort != null && strPort.length() > 0) {
00108             try {
00109                 this.port = Integer.parseInt(strPort);
00110             } catch (NumberFormatException ex) {
00111                 this.port = DEFAULT_PORT;
00112             }
00113         }
00114         
00115         WebServer.installPath = webserverProps.getProperty("installPath");
00116         servletFile = webserverProps.getProperty("servletFile");
00117         registry = new PathTreeDictionary();
00118         try {
00119             connexionPool = new ServerThreadPool();
00120         } catch (Exception ex) {
00121             LogManager.traceError(LogServices.WEBSERVICE,
00122                     "can not initialise server connexion pool");
00123             LogManager.traceError(0, ex);
00124         }
00125         attributes = new Hashtable();
00126         
00127         //init one session management
00128         //the webserver can only manage one session.
00129         SessionContextManager.getManager().createSessionContext("OPENMOBILEISSESSION");
00130         SessionContextManager.getManager().joinSessionContext("OPENMOBILEISSESSION");
00131     }
00132     
00134     // pattern, which can contain wildcards, and the class name of the Servlet
00135     // to launch when a matching URL comes in.  Patterns are checked for
00136     // matches in the order they were added, and only the first match is run.
00137     public void addServlet(String urlPat, String className) {
00138       addServlet(urlPat, className, (Hashtable) null);
00139     }
00140 
00141     public void addServlet(String urlPat, String className, Hashtable initParams) {
00142       // Check if we're allowed to make one of these.
00143       SecurityManager security = System.getSecurityManager();
00144       if (security != null) {
00145         int i = className.lastIndexOf('.');
00146         if (i != -1) {
00147           security.checkPackageAccess(className.substring(0, i));
00148           security.checkPackageDefinition(className.substring(0, i));
00149         }
00150       }
00151 
00152       // Make a new one.
00153       try {
00154         addServlet(urlPat, (Servlet) Class.forName(className).newInstance(), initParams);
00155         return;
00156       } catch (ClassNotFoundException e) {
00157         LogManager.traceError(0, e);
00158         LogManager.traceError(LogServices.WEBSERVICE, "Class not found: " + className);
00159       } catch (ClassCastException e) {
00160         LogManager.traceError(0, e);
00161         LogManager.traceError(LogServices.WEBSERVICE, "Class cast problem: " + e.getMessage());
00162       } catch (InstantiationException e) {
00163         LogManager.traceError(0, e);
00164         LogManager.traceError(LogServices.WEBSERVICE, "Instantiation problem: " + e.getMessage());
00165       } catch (IllegalAccessException e) {
00166         LogManager.traceError(0, e);
00167         LogManager.traceError(LogServices.WEBSERVICE, "Illegal class access: " + e.getMessage());
00168       } catch (Exception e) {
00169         LogManager.traceError(0, e);
00170         LogManager.traceError(LogServices.WEBSERVICE, "Unexpected problem creating servlet: " + e);
00171         LogManager.traceError(LogServices.WEBSERVICE, e);
00172       }
00173     }
00174 
00176     // which can contain wildcards, and the Servlet to
00177     // launch when a matching URL comes in.  Patterns are checked for
00178     // matches in the order they were added, and only the first match is run.
00179     public void addServlet(String urlPat, Servlet servlet) {
00180       addServlet(urlPat, servlet, (Hashtable) null);
00181     }
00182 
00183     public void addServlet(String urlPat, Servlet servlet, Hashtable initParams) {
00184       try {
00185         servlet.init(new ServeConfig((ServletContext) this, initParams, urlPat));
00186         registry.put(urlPat, servlet);
00187         servlets.put(servlet.getClass().getName(), urlPat);
00188       } catch (ServletException e) {
00189           LogManager.traceError(0, e);
00190           LogManager.traceError(LogServices.WEBSERVICE,
00191                   "Problem initializing servlet: " + e);
00192       }
00193     }
00194     
00195     public Object[] getServletByURLorClassName(String name) {
00196         Object[] servlet = new Object[2];
00197         servlet = registry.get(name);
00198         if (servlet[0] == null) {
00199             String servletUri = (String)servlets.get(name);
00200             if (servletUri != null && servletUri.trim().length() > 0) {
00201                 servlet = registry.get(servletUri);
00202             }
00203         }
00204         if (servlet[0] == null) {
00205             String newName = name;
00206             int index = newName.lastIndexOf('/');
00207             while (index != -1) {
00208                 newName = newName.substring(0, index);
00209                 servlet = registry.get(newName);
00210                 if (servlet[0] != null) {
00211                     break;
00212                 }
00213                 index = newName.lastIndexOf('/');
00214             }
00215         }
00216         return servlet;
00217     }
00218     
00219     // Run the server.  Returns only on errors.
00220     public void serve() throws IOException{
00221         // Load Servlets
00222         //this.loadServlets();
00223         
00224         // First of all, instantiate the LogManager to the console
00225         if (LogManager.getInstance() == null) {
00226                 LogManager.registerLogManager(null);
00227         }
00228         
00229         this.readServlets(servletFile);
00230         serverSocket = new ServerSocket(port, 1000);
00231         hostName = serverSocket.getInetAddress().getHostName();
00232         
00233         
00234         // start Web Browser
00235                 try {
00236             Plateform plateform = ApplicationContextManager.getManager().getApplicationContext().getPlateform();
00237             if (plateform.getOS().equals(Plateform.POCKETPCOS)) {
00238               if ((PropertiesManager.getManager().getProperty("org.openmobileis.embedded.execprog.browser")!=null) &&
00239                   (PropertiesManager.getManager().getProperty("org.openmobileis.embedded.execprog.browser.args")!=null))        {
00240                 System.loadLibrary("ExecDLL2002");
00241                       LogManager.traceInfo(0,"Start Pocket IE");
00242                 SystemAPI.execProgram(PropertiesManager.getManager().getProperty("org.openmobileis.embedded.execprog.browser")
00243                                                 , PropertiesManager.getManager().getProperty("org.openmobileis.embedded.execprog.browser.args")+"/"+Long.toString(System.currentTimeMillis())); //add long to avoid IE cache
00244               } else    {
00245                       LogManager.traceInfo(0,"Pocket IE not started on PocketPC no properties defined.");
00246               }
00247                         }
00248                 } catch (Throwable e) {
00249                         LogManager.traceError(0, e);
00250                         LogManager.traceError(LogServices.WEBSERVICE, "Can not launch ie with parameters : " + PropertiesManager.getManager().getProperty("execprog.browser")
00251                                         + " args : " + PropertiesManager.getManager().getProperty("execprog.browser.args"));
00252                 }
00253         
00254         try { // accept request from clients
00255             while (true) {
00256                 Socket socket = serverSocket.accept();
00257                 connexionPool.runServerConnexion(this, socket);
00258             } // end while
00259         } catch (IOException e) {
00260             LogManager.traceError(0, e);
00261             LogManager.traceError(LogServices.WEBSERVICE,
00262                     "IOEXception during servlet process Accept: " + e);
00263         } finally {
00264             try {
00265                 serverSocket.close();
00266             } catch (Exception e) {
00267                 LogManager.traceError(LogServices.WEBSERVICE, e);
00268             }
00269         }
00270     }
00271     
00273     public void destroyAllServlets() {
00274       Enumeration en = registry.elements();
00275       while (en.hasMoreElements()) {
00276         Servlet servlet = (Servlet) en.nextElement();
00277         servlet.destroy();
00278       }
00279       registry = new PathTreeDictionary();
00280       // invalidate all sessions?
00281     }
00282     
00283     /*
00284      * free all resources
00285      */
00286     public void freeResources() throws Exception {
00287         this.destroyAllServlets();
00288         connexionPool.freeResources();
00289         serverSocket.close();
00290         LogManager.traceInfo(LogServices.WEBSERVICE, "Web server is stopped");
00291         //System.exit(0);
00292     }
00293     
00294     private void readServlets(String cfgfile) {
00299         Hashtable servletstbl, parameterstbl;
00300         servletstbl = new Hashtable();
00301         parameterstbl = new Hashtable();
00302         if (cfgfile != null) {
00303           File file = new File(cfgfile);
00304           if (file.exists() && file.canRead()) {
00305             try {
00306               DataInputStream in = new DataInputStream(new FileInputStream(file));
00310               do {
00311                 String servletdsc = in.readLine();
00312                 if (servletdsc == null)
00313                   break;
00314                 StringTokenizer dsctokenzr = new StringTokenizer(servletdsc, ".=,", false);
00315                 if (dsctokenzr.hasMoreTokens()) {
00316                   if (!dsctokenzr.nextToken().equalsIgnoreCase("servlet")) {
00317                     System.err.println("No leading 'servlet' keyword, the sentence is skipped");
00318                     break;
00319                   }
00320                   if (dsctokenzr.hasMoreTokens()) {
00321                     String servletname = dsctokenzr.nextToken();
00322 
00323                     if (dsctokenzr.hasMoreTokens()) {
00324                       String lt = dsctokenzr.nextToken();
00325                       if (lt.equalsIgnoreCase("code")) {
00326                         if (dsctokenzr.hasMoreTokens())
00327                           servletstbl.put(servletname, dsctokenzr.nextToken("="));
00328                       } else if (lt.equalsIgnoreCase("initArgs")) {
00329                         Hashtable initparams = new Hashtable();
00330                         while (dsctokenzr.hasMoreTokens()) {
00331                           String key = dsctokenzr.nextToken("=,");
00332                           if (dsctokenzr.hasMoreTokens())
00333                             initparams.put(key, dsctokenzr.nextToken(",="));
00334                         }
00335                         parameterstbl.put(servletname, initparams);
00336                       } else
00337                         System.err.println("Unrecognized token " + lt + " in " + servletdsc + ", the line's skipped");
00338                     }
00339                   }
00340                 }
00341               }
00342               while (true);
00343             } catch (IOException e) {
00344               System.err.println("Problem reading cfg file: " + e);
00345             }
00346             Enumeration se = servletstbl.keys();
00347             String servletname;
00348             while (se.hasMoreElements()) {
00349               servletname = (String) se.nextElement();
00350               addServlet(servletname, (String) servletstbl.get(servletname), (Hashtable) parameterstbl.get(servletname));
00351             }
00352           }
00353         }
00354       }
00355     
00356 /*    protected void loadServlets() {
00357         // load servlets
00358         
00359         // add the FileServlet by default. By default, if there is no matching
00360         // with the other servlet,
00361         // the file servlet is choosen
00362         this.addServlet("/FileServlet", "org.openmobileis.services.servlet.FileServlet");
00363         
00364         java.util.Properties props = new java.util.Properties();
00365         try {
00366             props.load(new java.io.FileInputStream(servletFile));
00367             java.util.Enumeration enum = props.propertyNames();
00368             while (enum.hasMoreElements()) {
00369                 String className = (String) enum.nextElement();
00370                 String pattern = (String) props.getProperty(className);
00371                 this.addServlet(pattern, className);
00372             }
00373         } catch (IOException ex) {
00374             LogManager.traceError(0, ex);
00375         }
00376     }*/
00377     
00378     
00379     
00380     
00381     
00382     
00383     // ServletContext METHODS
00384     // ***************************************************************************************************************
00385 
00387     // null if the attribute does not exist.  This method allows access to
00388     // additional information about the service, not already provided by
00389     // the other methods in this interface.
00390     public Object getAttribute(String name) {
00391       // This server does not support attributes.
00392       return attributes.get(name);
00393     }
00394     
00395     public Enumeration getAttributeNames() {
00396         return attributes.keys();
00397         }
00398     
00399     public ServletContext getContext(String uripath) {
00400         return this; // only root context supported
00401         }
00402     
00403     // no way to specify parameters for context
00404     public String getInitParameter(String param) {
00405       return null;
00406     }
00407     
00408     public Enumeration getInitParameterNames() {
00409         return null;
00410         }
00411     
00412     public int getMajorVersion() {
00413         return 2; // support 2.x
00414         }
00415 
00417     // @param file file name whose MIME type is required
00418     public String getMimeType(String file) {
00419       file = file.toUpperCase();
00420 
00421       if (file.endsWith(".HTML") || file.endsWith(".HTM"))
00422         return "text/html";
00423       if (file.endsWith(".TXT"))
00424         return "text/plain";
00425       if (file.endsWith(".XML"))
00426         return "text/xml";
00427       if (file.endsWith(".CSS"))
00428         return "text/css";
00429       if (file.endsWith(".SGML") || file.endsWith(".SGM"))
00430         return "text/x-sgml";
00431       // Image
00432       if (file.endsWith(".GIF"))
00433         return "image/gif";
00434       if (file.endsWith(".JPG") || file.endsWith(".JPEG") || file.endsWith(".JPE"))
00435         return "image/jpeg";
00436       if (file.endsWith(".PNG"))
00437         return "image/png";
00438       if (file.endsWith(".TIF") || file.endsWith(".TIFF"))
00439         return "image/tiff";
00440       if (file.endsWith(".RGB"))
00441         return "image/x-rgb";
00442       if (file.endsWith(".XPM"))
00443         return "image/x-xpixmap";
00444       if (file.endsWith(".XBM"))
00445         return "image/x-xbitmap";
00446       if (file.endsWith(".SVG"))
00447         return "image/svg-xml ";
00448       if (file.endsWith(".SVGZ"))
00449         return "image/svg-xml ";
00450       // Audio
00451       if (file.endsWith(".AU") || file.endsWith(".SND"))
00452         return "audio/basic";
00453       if (file.endsWith(".MID") || file.endsWith(".MIDI") || file.endsWith(".RMI") || file.endsWith(".KAR"))
00454         return "audio/mid";
00455       if (file.endsWith(".MPGA") || file.endsWith(".MP2") || file.endsWith(".MP3"))
00456         return "audio/mpeg";
00457       if (file.endsWith(".WAV"))
00458         return "audio/wav";
00459       if (file.endsWith(".AIFF") || file.endsWith(".AIFC"))
00460         return "audio/aiff";
00461       if (file.endsWith(".AIF"))
00462         return "audio/x-aiff";
00463       if (file.endsWith(".RA"))
00464         return "audio/x-realaudio";
00465       if (file.endsWith(".RPM"))
00466         return "audio/x-pn-realaudio-plugin";
00467       if (file.endsWith(".RAM"))
00468         return "audio/x-pn-realaudio";
00469       if (file.endsWith(".SD2"))
00470         return "audio/x-sd2";
00471       // Application
00472       if (file.endsWith(".BIN") || file.endsWith(".DMS") || file.endsWith(".LHA") || file.endsWith(".LZH") || file.endsWith(".EXE") || file.endsWith(".CLASS"))
00473         return "application/octet-stream";
00474       if (file.endsWith(".HQX"))
00475         return "application/mac-binhex40";
00476       if (file.endsWith(".PS") || file.endsWith(".AI") || file.endsWith(".EPS"))
00477         return "application/postscript";
00478       if (file.endsWith(".PDF"))
00479         return "application/pdf";
00480       if (file.endsWith(".RTF"))
00481         return "application/rtf";
00482       if (file.endsWith(".DOC"))
00483         return "application/msword";
00484       if (file.endsWith(".PPT"))
00485         return "application/powerpoint";
00486       if (file.endsWith(".FIF"))
00487         return "application/fractals";
00488       if (file.endsWith(".P7C"))
00489         return "application/pkcs7-mime";
00490       // Application/x
00491       if (file.endsWith(".JS"))
00492         return "application/x-javascript";
00493       if (file.endsWith(".Z"))
00494         return "application/x-compress";
00495       if (file.endsWith(".GZ"))
00496         return "application/x-gzip";
00497       if (file.endsWith(".TAR"))
00498         return "application/x-tar";
00499       if (file.endsWith(".TGZ"))
00500         return "application/x-compressed";
00501       if (file.endsWith(".ZIP"))
00502         return "application/x-zip-compressed";
00503       if (file.endsWith(".DIR") || file.endsWith(".DCR") || file.endsWith(".DXR"))
00504         return "application/x-director";
00505       if (file.endsWith(".DVI"))
00506         return "application/x-dvi";
00507       if (file.endsWith(".TEX"))
00508         return "application/x-tex";
00509       if (file.endsWith(".LATEX"))
00510         return "application/x-latex";
00511       if (file.endsWith(".TCL"))
00512         return "application/x-tcl";
00513       if (file.endsWith(".CER") || file.endsWith(".CRT") || file.endsWith(".DER"))
00514         return "application/x-x509-ca-cert";
00515       // Video
00516       if (file.endsWith(".MPG") || file.endsWith(".MPE") || file.endsWith(".MPEG"))
00517         return "video/mpeg";
00518       if (file.endsWith(".QT") || file.endsWith(".MOV"))
00519         return "video/quicktime";
00520       if (file.endsWith(".AVI"))
00521         return "video/x-msvideo";
00522       if (file.endsWith(".MOVIE"))
00523         return "video/x-sgi-movie";
00524       // Chemical
00525       if (file.endsWith(".PDB") || file.endsWith(".XYZ"))
00526         return "chemical/x-pdb";
00527       // X-
00528       if (file.endsWith(".ICE"))
00529         return "x-conference/x-cooltalk";
00530       if (file.endsWith(".WRL") || file.endsWith(".VRML"))
00531         return "x-world/x-vrml";
00532       if (file.endsWith(".WML"))
00533         return "text/vnd.wap.wml";
00534       if (file.endsWith(".WMLC"))
00535         return "application/vnd.wap.wmlc";
00536       if (file.endsWith(".WMLS"))
00537         return "text/vnd.wap.wmlscript";
00538       if (file.endsWith(".WMLSC"))
00539         return "application/vnd.wap.wmlscriptc";
00540       if (file.endsWith(".WBMP"))
00541         return "image/vnd.wap.wbmp";
00542 
00543       return null;
00544     }
00545     
00546         public int getMinorVersion() {
00547             return 3; // support 2.3
00548         }
00549     
00550     public RequestDispatcher getNamedDispatcher(String name) {
00551         return this;
00552     }
00553     
00554     public String getRealPath(String path) {
00555         return installPath + FileUtilities.convertFileNameToSystem(path);
00556         //return htdocs + File.separator + FileUtilities.convertFileNameToSystem(path);
00557     }
00558     
00559     public RequestDispatcher getRequestDispatcher(String path) {
00560         return this;
00561     }
00562     
00563     // only root relative in this implementation
00564     public URL getResource(String path) throws MalformedURLException {
00565       return new URL("http", hostName, port, path);
00566     }
00567     
00568     public InputStream getResourceAsStream(String path) {
00569         return null; // we don't provide resources in this way
00570         }
00571     
00572     public java.util.Set getResourcePaths(java.lang.String path) {
00573         // TODO: implement
00574         return null;
00575         }
00576     
00578     // is running.
00579     // Same as the CGI variable SERVER_SOFTWARE.
00580     public String getServerInfo() {
00581       return Identification.serverName + " " + Identification.serverVersion + " (" + Identification.serverUrl + ")";
00582     }
00583     
00584     public Servlet getServlet(String name) {
00585         // Deprecated. As of Java Servlet API 2.1, with no direct replacement.
00586         // This method was originally defined to retrieve a servlet from a ServletContext.
00587         // In this version, this method always returns null and remains only to preserve binary compatibility.
00588         // This method will be permanently removed in a future version of the Java Servlet API.
00589 
00590         // In lieu of this method, servlets can share information using the ServletContext class
00591         // and can perform shared business logic by invoking methods on common non-servlet classes.
00592         return null;
00593     }
00594     
00601     public java.lang.String getServletContextName() {
00602       return null; //"ROOT";
00603     }
00604     
00606     // servlets that are accesible will be returned.  This enumeration always
00607     // includes the servlet itself.
00608     public Enumeration getServletNames() {
00609         // Deprecated. As of Java Servlet API 2.1, with no replacement.
00610         // This method was originally defined to return an Enumeration of all the servlet names known to this context.
00611         // In this version, this method always returns an empty Enumeration and remains only to preserve binary compatibility.
00612         // This method will be permanently removed in a future version of the Java Servlet API.
00613         return new Vector().elements();
00614         }
00615     
00616     public Enumeration getServlets() {
00617         // Deprecated. As of Java Servlet API 2.0, with no replacement.
00618         // This method was originally defined to return an Enumeration of all the servlets known to this servlet context.
00619         // In this version, this method always returns an empty enumeration and remains only to preserve binary compatibility.
00620         // This method will be permanently removed in a future version of the Java Servlet API.
00621         return new Vector().elements();
00622     }
00623     
00624     public void log(Exception exception, String msg) {
00625         LogManager.traceWarning(LogServices.WEBSERVICE, msg);
00626         LogManager.traceWarning(LogServices.WEBSERVICE, exception);
00627     }
00628     
00629     public void log(String msg) {
00630         LogManager.traceWarning(LogServices.WEBSERVICE, msg);
00631     }
00632     
00633     public void log(String message, Throwable throwable) {
00634         LogManager.traceWarning(LogServices.WEBSERVICE, message);
00635         LogManager.traceWarning(LogServices.WEBSERVICE, throwable);
00636     }
00637     
00638     public void removeAttribute(String name) {
00639         attributes.remove(name);
00640         }
00641     
00642     public void setAttribute(String name, Object object) {
00643         attributes.put(name, object);
00644         }
00645     
00646     
00647     
00648     // RequestDispatcher METHODS
00649     // ***************************************************************************************************************
00650     
00651     public void forward(ServletRequest request, ServletResponse response) {
00652     }
00653     public void include(ServletRequest request, ServletResponse response) {
00654     }
00655 }

Generated on Mon Jul 10 10:29:33 2006 for OpenMobileIS by  doxygen 1.4.4