From: Ken A. <kan...@bb...> - 2004-03-11 00:01:03
|
This is a nice example. I think Tim uses jetty because it is easier to use than Tomcat. I created the src/using directory to show how JScheme could be used to do things "normal Java" users want to do, in hopes of making them "abnormal Java users empowered by JScheme". So, maybe we could turn thiis into a using/jetty.scm example, if you'd like. At 03:55 PM 3/10/2004 -0500, Geoffrey Knauth wrote: >This is not only cool but useful, since I recently started using JSPWiki. I'm glad I read to the last line. > >Geoffrey >-- >Geoffrey S. Knauth | http://knauth.org/gsk > >On Mar 3, 2004, at 13:46, Ken Anderson wrote: > >>Very nice! >> >>At 09:43 AM 3/3/2004 -0800, david wrote: >> >>>(still cannot post directly to the list) >> >>Did you get a sourceforge account? Did sourceforge let you on the list? I've had some trouble with this on other groups. >> >>>I have been using this trick trick to run a webapp server >>>without a proper install of tomcat or jetty. All you >>>need are the jars in the classpath and some scheme >>>like this.. which I put in a jar as init.scm. >>>It does not unpack the war file by default so all >>>the jars can be read only. >>> >>>(load "elf/classpath.scm") >>>(map (lambda (u) (addClasspathUrl u)) '( >>> "/usr/share/davud/jars/javax.servlet.jar" >>> "/usr/share/davud/jars/org.mortbay.jetty.jar" >>> "/usr/share/davud/jars/org.mortbay.jmx.jar" >>> "/usr/share/davud/jars/jscheme.jar" >>> "/usr/share/davud/jars/ant.jar" >>> "/usr/share/davud/jars/jasper-compiler.jar" >>> "/usr/share/davud/jars/jasper-runtime.jar" >>> "/usr/share/davud/jars/jcert.jar" >>> "/usr/share/davud/jars/jmxri.jar" >>> "/usr/share/davud/jars/jmxtools.jar" >>> "/usr/share/davud/jars/jnet.jar" >>> "/usr/share/davud/jars/jsse.jar" >>> "/usr/share/davud/jars/xercesImpl.jar" >>> "/usr/share/davud/jars/xml-apis.jar")) >>> >>> >>>(import "java.io.*") >>>(import "java.net.*") >>>(import "org.mortbay.util.*") >>>(import "org.mortbay.http.*") >>>(import "org.mortbay.jetty.servlet.*") >>>(import "org.mortbay.http.handler.*") >>>(import "org.mortbay.servlet.*") >>>(define server (org.mortbay.jetty.Server.)) >>>(define listener (SocketListener.)) >>>(.setPort listener 8088); >>>(.addListener server listener) >>> >>> >>>(define r2 (HashUserRealm. "Slide DAV Server")) >>> >>>(.put r2 (String. "root") (String. "root")) >>>(.addUserToRole r2 "root" "guest") >>>(.addUserToRole r2 "root" "user") >>>(.addUserToRole r2 "root" "root") >>> >>> >>>(.put r2 (String. "david") (String. "david")) >>>(.addUserToRole r2 "david" "guest") >>>(.addUserToRole r2 "david" "user") >>>(.addUserToRole r2 "david" "root") >>> >>>(.put r2 (String. "ed") (String. "david")) >>>(.addUserToRole r2 "ed" "guest") >>>(.addUserToRole r2 "ed" "user") >>>(.addUserToRole r2 "ed" "root") >>>(.addRealm server r2) >>>(.addWebApplication server "/dav" "/tmp/slide.war") >>>(.addWebApplication server "/" "/usr/share/davud/jars/JSPWiki.war") >>>(.start server) > > > >------------------------------------------------------- >This SF.Net email is sponsored by: IBM Linux Tutorials >Free Linux tutorial presented by Daniel Robbins, President and CEO of >GenToo technologies. Learn everything from fundamentals to system >administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click >_______________________________________________ >Jscheme-user mailing list >Jsc...@li... >https://lists.sourceforge.net/lists/listinfo/jscheme-user |