Update of /cvsroot/smartfrog/core/components/jetty/src/org/smartfrog/services/jetty In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28084/components/jetty/src/org/smartfrog/services/jetty Modified Files: JettyHelper.java JettyIntf.java SFJetty.java components.sf Added Files: jetty-complete.sf jetty-core.sf Log Message: migrate more stuff to the services/www space, and split the jetty declarations. Index: SFJetty.java =================================================================== RCS file: /cvsroot/smartfrog/core/components/jetty/src/org/smartfrog/services/jetty/SFJetty.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** SFJetty.java 28 Jul 2005 16:20:15 -0000 1.19 --- SFJetty.java 2 Aug 2005 15:37:11 -0000 1.20 *************** *** 54,58 **** public class SFJetty extends CompoundImpl implements Compound,JettyIntf { ! protected Reference jettyhomeRef = new Reference(JETTY_HOME); /** --- 54,58 ---- public class SFJetty extends CompoundImpl implements Compound,JettyIntf { ! protected Reference jettyhomeRef = new Reference(ATTR_JETTY_HOME); /** *************** *** 79,82 **** --- 79,88 ---- public static final String LOG_SUBDIR = "/logs/"; + /** + * Error string raised in liveness checks. + * {@value} + */ + public static final String LIVENESS_ERROR_SERVER_NOT_STARTED = "Server is not started"; + /** *************** *** 99,103 **** jettyhome = sfResolve(jettyhomeRef, jettyhome, true); jettyHelper.cacheJettyHome(jettyhome); ! enableLogging=sfResolve(ENABLE_LOGGING,enableLogging,true); if(enableLogging) { --- 105,109 ---- jettyhome = sfResolve(jettyhomeRef, jettyhome, true); jettyHelper.cacheJettyHome(jettyhome); ! enableLogging=sfResolve(ATTR_ENABLE_LOGGING,enableLogging,true); if(enableLogging) { *************** *** 138,142 **** NCSARequestLog requestlog = new NCSARequestLog(); requestlog.setFilename(logDir+File.separatorChar+logPattern); ! requestlog.setBuffered(false); requestlog.setRetainDays(90); requestlog.setAppend(true); --- 144,149 ---- NCSARequestLog requestlog = new NCSARequestLog(); requestlog.setFilename(logDir+File.separatorChar+logPattern); ! //commented out as this is deprecated/ignored. ! //requestlog.setBuffered(false); requestlog.setRetainDays(90); requestlog.setAppend(true); *************** *** 178,182 **** super.sfPing(source); if(server==null || !server.isStarted()) { ! throw new SmartFrogLivenessException("Server is not started"); } } --- 185,189 ---- super.sfPing(source); if(server==null || !server.isStarted()) { ! throw new SmartFrogLivenessException(LIVENESS_ERROR_SERVER_NOT_STARTED); } } Index: JettyIntf.java =================================================================== RCS file: /cvsroot/smartfrog/core/components/jetty/src/org/smartfrog/services/jetty/JettyIntf.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** JettyIntf.java 19 Jul 2005 00:04:53 -0000 1.8 --- JettyIntf.java 2 Aug 2005 15:37:11 -0000 1.9 *************** *** 31,41 **** /** jetty home attribute */ ! String JETTY_HOME = "jettyhome"; ! String JETTY_SERVER = "Jetty Server"; ! ! String SERVER = "server"; ! String ENABLE_LOGGING="enableLogging"; public static final String ATTR_LOGDIR="logDir"; --- 31,39 ---- /** jetty home attribute */ ! public static final String ATTR_JETTY_HOME = "jettyhome"; ! public static final String ATTR_JETTY_SERVER = "Jetty Server"; ! public static final String ATTR_ENABLE_LOGGING="enableLogging"; public static final String ATTR_LOGDIR="logDir"; Index: JettyHelper.java =================================================================== RCS file: /cvsroot/smartfrog/core/components/jetty/src/org/smartfrog/services/jetty/JettyHelper.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** JettyHelper.java 1 Aug 2005 16:34:26 -0000 1.13 --- JettyHelper.java 2 Aug 2005 15:37:11 -0000 1.14 *************** *** 28,31 **** --- 28,33 ---- import org.mortbay.jetty.servlet.ServletHttpContext; import org.smartfrog.services.jetty.contexts.JettyServletContextIntf; + import org.smartfrog.services.www.JavaWebApplicationServer; + import org.smartfrog.services.www.ApplicationServerContext; import org.smartfrog.sfcore.common.SmartFrogException; import org.smartfrog.sfcore.common.SmartFrogResolutionException; *************** *** 74,77 **** --- 76,84 ---- private static final int MAX_PARENT_DEPTH = 99999; + + /** + * Error if we cannot locate an app server. + * {@value} + */ public static final String ERROR_NO_APP_SERVER = "No Web Server found"; *************** *** 102,106 **** HttpServer server = null; server = ! (HttpServer) serverComponent.sfResolve(JettyIntf.JETTY_SERVER, server, true); --- 109,113 ---- HttpServer server = null; server = ! (HttpServer) serverComponent.sfResolve(JettyIntf.ATTR_JETTY_SERVER, server, true); *************** *** 121,138 **** //look for an attribute first serverComponent = ! getOwner().sfResolve(JettyIntf.SERVER, serverComponent, ! false); ! if (serverComponent == null) { ! serverComponent = findAncestorImplementing( ! JETTY_INTERFACE_NAME, ! -1); ! if (serverComponent == null) { ! throw new SmartFrogResolutionException( ! ERROR_NO_APP_SERVER); ! } ! } ! } } --- 128,137 ---- //look for an attribute first serverComponent = ! getOwner().sfResolve(ApplicationServerContext.ATTR_SERVER, serverComponent, ! true); ! //throw new SmartFrogResolutionException(ERROR_NO_APP_SERVER); } + } *************** *** 146,150 **** public void cacheJettyServer(HttpServer server) throws SmartFrogException, RemoteException { ! getOwner().sfReplaceAttribute(JettyIntf.JETTY_SERVER, server); } --- 145,149 ---- public void cacheJettyServer(HttpServer server) throws SmartFrogException, RemoteException { ! getOwner().sfReplaceAttribute(JettyIntf.ATTR_JETTY_SERVER, server); } *************** *** 162,166 **** String jettyhome = null; jettyhome = ! serverComponent.sfResolve(JettyIntf.JETTY_HOME, jettyhome, false); --- 161,165 ---- String jettyhome = null; jettyhome = ! serverComponent.sfResolve(JettyIntf.ATTR_JETTY_HOME, jettyhome, false); *************** *** 177,181 **** public void cacheJettyHome(String jettyhome) throws SmartFrogRuntimeException, RemoteException { ! getOwner().sfReplaceAttribute(JettyIntf.JETTY_HOME, jettyhome); } --- 176,180 ---- public void cacheJettyHome(String jettyhome) throws SmartFrogRuntimeException, RemoteException { ! getOwner().sfReplaceAttribute(JettyIntf.ATTR_JETTY_HOME, jettyhome); } --- NEW FILE: jetty-complete.sf --- /** (C) Copyright 2005 Hewlett-Packard Development Company, LP 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.1 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 USA For more information: www.smartfrog.org */ #include "org/smartfrog/components.sf"; #include "org/smartfrog/sfcore/workflow/components.sf"; #include "org/smartfrog/functions.sf"; #include "/org/smartfrog/predicates.sf" #include "org/smartfrog/services/utils/concat/components.sf" #include "org/smartfrog/services/filesystem/components.sf" //liveness and webserver #include "/org/smartfrog/services/www/components.sf" #include "/org/smartfrog/services/jetty/jetty-core.sf" /** * This defines a complete Jetty component */ /*========================================== declare extras ===========================================*/ /** * This component is a jetty http server, with * the standard listeners and contexts */ HttpServer extends CoreJettyServer { sfClass "org.smartfrog.services.jetty.SFJetty"; listeners extends Listeners; //optional contexts extends Contexts; //optional //if logging is enabled, then it logs to jettyhome/logs. enableLogging true; port 8080; } /*========================================== declare jetty contexts ===========================================*/ Contexts extends Compound { Context1 ATTRIB rootWAR; Context2 ATTRIB jettyDemo; Context3 ATTRIB jettyExamples; Context4 ATTRIB jettyJavadoc; Context5 ATTRIB context5; Context6 ATTRIB context6; } rootWAR extends JettyWebApplication { contextPath "/"; warFile "/demo/webapps/root"; } jettyDemo extends JettyWebApplication { contextPath "/jetty"; warFile "/demo/webapps/jetty"; } jettyExamples extends JettyWebApplication { contextPath "/examples"; warFile "/demo/webapps/examples"; requestId true; //optional } context4 extends JettyServletContext { contextPath "/demo"; resourceBase "/demo/docroot"; classpath "/demo/servlets"; handlers extends Handlers; //optional servlets extends Servlets; //optional } jettyJavadoc extends JettyServletContext { contextPath "/javadoc"; resourceBase "/javadoc"; } context6 extends JettyServletContext { contextPath "/cgi-bin"; resourceBase "/cgi-bin"; servlets extends CGIservlet { } } /*========================================== declare handlers ===========================================*/ Handlers extends Compound { Handler1 extends JettyForwardHandler {} Handler2 extends JettyHTAccessHandler {} Handler3 extends JettyDumpHandler {}; } JettyDumpHandler extends JettyHandler { sfClass "org.smartfrog.services.jetty.contexts.handlers.Dump"; } JettyHTAccessHandler extends JettyHandler { sfClass "org.smartfrog.services.jetty.contexts.handlers.HTAccess"; accessFile ".htaccess"; } JettyForwardHandler extends JettyHandler { sfClass "org.smartfrog.services.jetty.contexts.handlers.Forward"; mapfromPath "/forward/*"; maptoPath "/dump"; } /*========================================== declare servlets ===========================================*/ Servlets extends Compound { Servlet1 ATTRIB InvokerServlet; Servlet2 ATTRIB DumpServlet; Servlet3 ATTRIB Sessionservlet; Servlet4 ATTRIB DispatchServlet; Servlet5 ATTRIB JSPServlet; Servlet6 ATTRIB SrcDefaultServlet; } InvokerServlet extends JettyServlet { name "Invoker"; pathSpec "/servlet/*"; className "org.mortbay.jetty.servlet.Invoker"; } DumpServlet extends JettyServlet { name "Dump"; pathSpec "/dump/*:*.DUMP"; className "org.mortbay.servlet.Dump"; initParams [["InitParam","Value"]]; } SessionServlet extends JettyServlet { name "Session"; pathSpec "/session/*"; className "org.mortbay.servlet.SessionDump"; } DispatchServlet extends JettyServlet { name "Dispatch"; pathSpec "/dispatch/*"; className "org.mortbay.servlet.RequestDispatchTest"; } JSPServlet extends JettyServlet { name "JSP"; pathSpec "*.jsp"; className "org.apache.jasper.servlet.JspServlet"; } SrcDefaultServlet extends JettyServlet { name "SrcDefault"; pathSpec "/src/*"; className "org.mortbay.jetty.servlet.Default"; initParams [["dirAllowed","true"], ["resourceBase", (jettyhome ++ "/src")]]; } CGIservlet extends JettyServlet { name "Common Gateway Interface"; pathSpec "/"; className "org.mortbay.servlet.CGI"; initParams [["Path","/bin:/usr/bin:/usr/local/bin"], ["ENV_TEST", ("Jetty home is " ++ jettyhome)]]; } /*========================================== declare listeners ===========================================*/ Listeners extends Compound { Listener1 ATTRIB listener1; Listener2 ATTRIB listener2; } /** * this listens on a direct port */ listener1 extends JettyListener { listenerPort PARENT:PARENT:port; serverHost PARENT:PARENT:serverHost; } /** * this fields requests handed off from Apache HTTPD * this is not a secure protocol, and the port must not be externally visible. */ listener2 extends JettyListener { sfClass "org.smartfrog.services.jetty.listeners.AJPlistener"; listenerPort 8009; serverHost PARENT:PARENT:serverHost; } --- NEW FILE: jetty-core.sf --- /** (C) Copyright 2005 Hewlett-Packard Development Company, LP 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.1 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 USA For more information: www.smartfrog.org */ #include "org/smartfrog/components.sf" #include "org/smartfrog/sfcore/workflow/components.sf" #include "org/smartfrog/functions.sf" #include "/org/smartfrog/predicates.sf" #include "org/smartfrog/services/utils/concat/components.sf" #include "org/smartfrog/services/filesystem/components.sf" //liveness and webserver #include "/org/smartfrog/services/www/components.sf" /** * this defines the core of jetty */ /* * The jetty components consist of * Listeners for incoming requests */ /** * schema for the base jetty server extends * base webserver schema */ CoreJettySchema extends Schema { jettyhome extends String; enableLogging extends Boolean; serverHost extends String; //log pattern logPattern extends String; //could be a file or a directory //relative paths are resolved relative to jetty home logDir extends Optional; } /** * this is jetty with no running listeners or contexts. * It is implemented as a compound; you can add anything underneath it and they * will be deployed. */ CoreJettyServer extends ApplicationServer { sfClass "org.smartfrog.services.jetty.SFJetty"; coreJettySchema extends CoreJettySchema; serverHost "localhost"; //synchronous deploy/undeploy policy sfSyncTerminate true; port 8080; //deployment information supportsEAR false; supportsWAR true; supportsServletContext true; //logging is optional. Once turned on, the pattern and logdir are mandatory enableLogging false; logPattern "yyyy_mm_dd.request.log"; logDir "log"; } /** * this is the admin channel for jetty */ JettyAdminSchema extends Schema { listenerPort extends Integer; httpserverHost extends String; contextPath extends String; } HttpServerAdmin extends Prim { sfClass "org.smartfrog.services.jetty.SFJettyAdmin"; listenerPort 8081; // the port on which the http server listens httpserverHost "localhost"; contextPath "/"; } /** * a jetty servlet context is a compound * with a resource base * It defines something to be deployed on a jetty server */ JettyServletContextSchema extends Schema { //location of resources resourceBase extends String; //url path on server contextPath extends String; //classpath. Not tested yet. classpath extends OptionalString; //runtime only ipaddr extends OptionalString; } JettyServletContext extends ServletContext { sfClass "org.smartfrog.services.jetty.contexts.JettyServletContext"; jettyServletContextSchema extends JettyServletContextSchema; } /** * a jetty web application is bound * to the jetty implementation */ JettyWebApplication extends WebApplication { sfClass "org.smartfrog.services.jetty.contexts.WebApplication"; } /** * jetty handlers handle requests. * there is no schema, or other information, but we declare * an extra template for clarity */ JettyHandler extends ApplicationServerContext { } /** * listeners listen on ports */ JettyListenerSchema extends Schema { listenerPort extends Integer; serverHost extends OptionalString; server extends OptionalString; } JettyListener extends ApplicationServerContext { sfClass "org.smartfrog.services.jetty.listeners.Socketlistener"; jettyListenerSchema extends JettyListenerSchema; } /** * and this implementing class binds the servlet to * jetty */ JettyServlet extends Servlet { sfClass "org.smartfrog.services.jetty.contexts.servlets.JettyServletImpl"; } Index: components.sf =================================================================== RCS file: /cvsroot/smartfrog/core/components/jetty/src/org/smartfrog/services/jetty/components.sf,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** components.sf 1 Aug 2005 16:34:27 -0000 1.22 --- components.sf 2 Aug 2005 15:37:11 -0000 1.23 *************** *** 1,352 **** ! #include "org/smartfrog/components.sf"; ! #include "org/smartfrog/sfcore/workflow/components.sf"; ! #include "org/smartfrog/functions.sf"; ! #include "/org/smartfrog/predicates.sf" ! #include "org/smartfrog/services/utils/concat/components.sf" ! #include "org/smartfrog/services/filesystem/components.sf" ! //liveness and webserver ! #include "/org/smartfrog/services/www/components.sf" ! ! /* ! * The jetty components consist of ! * Listeners for incoming requests ! */ ! ! ! /** ! * schema for the base jetty server extends ! * base webserver schema ! */ ! CoreJettySchema extends WebServerSchema { ! jettyhome extends String; ! enableLogging extends Boolean; ! serverHost extends String; ! //log pattern ! logPattern extends String; ! //could be a file or a directory ! //relative paths are resolved relative to jetty home ! logDir extends Optional; ! } ! ! /** ! * this is jetty with no running listeners or contexts. ! * It is implemented as a compound; you can add anything underneath it and they ! * will be deployed. ! */ ! CoreJettyServer extends JavaApplicationServer { ! sfClass "org.smartfrog.services.jetty.SFJetty"; ! coreJettySchema extends CoreJettySchema; ! serverHost "localhost"; ! //synchronous deploy/undeploy policy ! sfSyncTerminate true; ! port 8080; ! ! //deployment information ! supportsEAR false; ! supportsWAR true; ! supportsServletContext true; ! ! ! //logging is optional. Once turned on, the pattern and logdir are mandatory ! enableLogging false; ! logPattern "yyyy_mm_dd.request.log"; ! logDir "log"; ! } ! ! /** ! * This component is a jetty http server, with ! * the standard listeners and contexts ! */ ! ! HttpServer extends CoreJettyServer { ! sfClass "org.smartfrog.services.jetty.SFJetty"; ! listeners extends Listeners; //optional ! contexts extends Contexts; //optional ! //if logging is enabled, then it logs to jettyhome/logs. ! enableLogging true; ! port 8080; ! } ! ! /** ! * this is the admin channel for jetty ! */ ! JettyAdminSchema extends Schema { ! listenerPort extends Integer; ! httpserverHost extends String; ! contextPath extends String; ! } ! ! HttpServerAdmin extends Prim { ! sfClass "org.smartfrog.services.jetty.SFJettyAdmin"; ! listenerPort 8081; // the port on which the http server listens ! httpserverHost "localhost"; ! contextPath "/"; ! } ! ! ! /** ! * a jetty servlet context is a compound ! * with a resource base ! * It defines something to be deployed on a jetty server ! */ ! ! JettyServletContextSchema extends Schema { ! //location of resources ! resourceBase extends String; ! //url path on server ! contextPath extends String; ! ! //classpath. Not tested yet. ! classpath extends OptionalString; ! ! //runtime only ! ipaddr extends OptionalString; ! } ! ! JettyServletContext extends ServletContext { ! sfClass "org.smartfrog.services.jetty.contexts.JettyServletContext"; ! jettyServletContextSchema extends JettyServletContextSchema; ! } ! ! ! /** ! * a jetty web application has a context path ! * and a a path to its home directory ! */ ! JettyWebApplicationSchema extends Schema { ! ! //webapp is a name of an app or a directory ! warFile extends String; ! } ! ! JettyWebApplication extends JavaWebApplication { ! jettyWebApplicationSchema extends JettyWebApplicationSchema; ! sfClass "org.smartfrog.services.jetty.contexts.WebApplication"; ! } ! ! /** ! * jetty handlers handle requests. ! * there is no schema, or other information, but we declare ! * an extra template for clarity ! */ ! JettyHandler extends Prim { ! } ! ! ! /** ! * listeners listen on ports ! */ ! JettyListenerSchema extends Schema { ! listenerPort extends Integer; ! serverHost extends OptionalString; ! server extends OptionalString; ! } ! ! JettyListener extends Prim { ! sfClass "org.smartfrog.services.jetty.listeners.Socketlistener"; ! jettyListenerSchema extends JettyListenerSchema; ! } ! ! ! /** ! * and this implementing class binds the servlet to ! * jetty ! */ ! JettyServlet extends Servlet { ! sfClass "org.smartfrog.services.jetty.contexts.servlets.JettyServletImpl"; ! ! } ! ! ! ! /*========================================== ! declare extras ! ===========================================*/ ! ! /** ! A mime is a tuple of name,value. that is bound to a servlet context ! It does not get cleaned up after; you need to terminate the servlet ! */ ! ! MimeType extends Prim { ! sfClass "org.smartfrog.services.jetty.extras.MimeTypeImpl"; ! ! mimeTypeSchema extends Schema { ! extension extends String; ! type extends String; ! } ! } ! ! ! /*========================================== ! declare jetty contexts ! ===========================================*/ ! ! Contexts extends Compound { ! Context1 ATTRIB context1; ! Context2 ATTRIB context2; ! Context3 ATTRIB context3; ! Context4 ATTRIB context4; ! Context5 ATTRIB context5; ! Context6 ATTRIB context6; ! } ! ! context1 extends JettyWebApplication { ! contextPath "/"; ! warFile "/demo/webapps/root"; ! } ! ! context2 extends JettyWebApplication { ! contextPath "/jetty"; ! warFile "/demo/webapps/jetty"; ! } ! ! context3 extends JettyWebApplication { ! contextPath "/examples"; ! warFile "/demo/webapps/examples"; ! requestId true; //optional ! } ! ! context4 extends JettyServletContext { ! contextPath "/demo"; ! resourceBase "/demo/docroot"; ! classpath "/demo/servlets"; ! handlers extends Handlers; //optional ! servlets extends Servlets; //optional ! } ! ! context5 extends JettyServletContext { ! contextPath "/javadoc"; ! resourceBase "/javadoc"; ! } ! ! context6 extends JettyServletContext { ! contextPath "/cgi-bin"; ! resourceBase "/cgi-bin"; ! servlets extends CGI; //optional ! } ! ! CGI extends Compound { ! servlet1 ATTRIB CGIservlet; ! } ! ! /*========================================== ! declare handlers ! ===========================================*/ ! ! Handlers extends Compound { ! Handler1 ATTRIB handler1; ! Handler2 ATTRIB handler2; ! Handler3 ATTRIB handler3; ! } ! ! handler1 extends Forward {} ! ! handler2 extends HTAccess {} ! ! handler3 extends Dump {} ! ! ! ! Dump extends JettyHandler { ! sfClass "org.smartfrog.services.jetty.contexts.handlers.Dump"; ! } ! ! HTAccess extends JettyHandler { ! sfClass "org.smartfrog.services.jetty.contexts.handlers.HTAccess"; ! accessFile ".htaccess"; ! } ! ! Forward extends JettyHandler { ! sfClass "org.smartfrog.services.jetty.contexts.handlers.Forward"; ! mapfromPath "/forward/*"; ! maptoPath "/dump"; ! } ! ! /*========================================== ! declare servlets ! ===========================================*/ ! ! Servlets extends Compound { ! Servlet1 ATTRIB InvokerServlet; ! Servlet2 ATTRIB DumpServlet; ! Servlet3 ATTRIB Sessionservlet; ! Servlet4 ATTRIB DispatchServlet; ! Servlet5 ATTRIB JSPServlet; ! Servlet6 ATTRIB SrcDefaultServlet; ! } ! ! ! ! InvokerServlet extends JettyServlet { ! name "Invoker"; ! pathSpec "/servlet/*"; ! className "org.mortbay.jetty.servlet.Invoker"; ! } ! ! DumpServlet extends JettyServlet { ! name "Dump"; ! pathSpec "/dump/*:*.DUMP"; ! className "org.mortbay.servlet.Dump"; ! initParams [["InitParam","Value"]]; ! } ! ! SessionServlet extends JettyServlet { ! name "Session"; ! pathSpec "/session/*"; ! className "org.mortbay.servlet.SessionDump"; ! } ! ! DispatchServlet extends JettyServlet { ! name "Dispatch"; ! pathSpec "/dispatch/*"; ! className "org.mortbay.servlet.RequestDispatchTest"; ! } ! ! JSPServlet extends JettyServlet { ! name "JSP"; ! pathSpec "*.jsp"; ! className "org.apache.jasper.servlet.JspServlet"; ! } ! SrcDefaultServlet extends JettyServlet { ! name "SrcDefault"; ! pathSpec "/src/*"; ! className "org.mortbay.jetty.servlet.Default"; ! initParams [["dirAllowed","true"], ["resourceBase", (jettyhome ++ "/src")]]; ! } ! CGIservlet extends JettyServlet { ! name "Common Gateway Interface"; ! pathSpec "/"; ! className "org.mortbay.servlet.CGI"; ! initParams [["Path","/bin:/usr/bin:/usr/local/bin"], ["ENV_TEST", ("Jetty home is " ++ jettyhome)]]; ! } ! /*========================================== ! declare listeners ! ===========================================*/ ! Listeners extends Compound { ! Listener1 ATTRIB listener1; ! Listener2 ATTRIB listener2; ! } - /** - * this listens on a direct port */ - listener1 extends JettyListener { - listenerPort PARENT:PARENT:port; - serverHost PARENT:PARENT:serverHost; - } /** ! * this fields requests handed off from Apache HTTPD ! * this is not a secure protocol, and the port must not be externally visible. */ - listener2 extends JettyListener { - sfClass "org.smartfrog.services.jetty.listeners.AJPlistener"; - listenerPort 8009; - serverHost PARENT:PARENT:serverHost; - } --- 1,29 ---- ! /** (C) Copyright 2005 Hewlett-Packard Development Company, LP ! 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.1 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 USA ! For more information: www.smartfrog.org */ /** ! * jetty support is split into the jetty core and the ! * complete definition. */ + //core jetty components + #include "/org/smartfrog/services/jetty/jetty-core.sf" + //complete jetty definition + #include "/org/smartfrog/services/jetty/jetty-complete.sf" |