tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Costin Manolache <cos...@gmail.com>
Subject Re: patch for allowing tomcat-lite to compile
Date Fri, 06 Nov 2009 19:53:58 GMT
There are also some unit tests that should do that...

See the other mail I sent - my changes would pretty much break the current
tomcat-lite ( different
connector with very different I/O and charset conversion ), but the API is
almost the same.

Costin

On Fri, Nov 6, 2009 at 11:33 AM, Tim Funk <funkman@apache.org> wrote:

> FWIW - Here is a way to launch tomcat lite via a bsh script - so via bsh  -
> you can easily kick the tires of Tomcat Lite and change by just doing some
> scripting.
>
> What I haven't played with is creating Filters/Servlets in bsh and
> injecting them instead [instead of writing java files and then compiling]
>
> -Tim
>
>
> /*
> Assumptions
>  0) I used java6
>  1) $JAVA_HOME/bin/java  -cp bsh-2.0b4.jar bsh.Interpreter  tomcat.bsh
>  2) Your jars are in the same dir as tomcat.bsh
>  3) your webapp is here: C:/opt/data/src/TOMCAT/tc6-trunk/webapps/ROOT
>
>  Apologies for assumption 3
> */
>
>
> // Set up your classpath
> String scriptDir =
> dirname(pathToFile(getSourceFileInfo()).getAbsolutePath());
> addClassPath((new File(scriptDir,
> "tomcat-lite_javax_coyote.jar")).toURL());
> addClassPath((new File(scriptDir, "tomcat-lite-all.jar")).toURL());
>
>
> // Create your tomcat lite and set the connector
> org.apache.tomcat.lite.TomcatLite lite = new
> org.apache.tomcat.lite.TomcatLite();
> lite.setConnector(new org.apache.tomcat.lite.coyote.CoyoteConnector());
>
>
> // Add a servlet context
> lite.addServletContext("", "C:/opt/data/src/TOMCAT/tc6-trunk/webapps/ROOT",
> "/");
>
>
> /* Inititialize and go */
> lite.init();
> lite.start();
> lite.startConnector();
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message