tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Johnny Kewl" <j...@kewlstuff.co.za>
Subject Re: Running Embedded Tomcat from Java Web Start
Date Thu, 24 May 2007 17:21:00 GMT
Hi Andrew,

The problem is not Tomcat, its WebStart, I hate that thing... know I'm going 
to get flamed ;)
WebStart also seems to crash with RPC applications... and I think that as 
soon as an application has classloaders in it, Web Start is touch and go...
Also I imagine you know you have to get certs and all that stuff....

Anyway, I got so the dispondant with web start I made my own app called 
IGNITION.
You can get it at http://coolese.100free.com/

Briefly... you have your embedded app... you build it... then look under 
your "build" folder and you will see the class structure for your app... (ie 
you dont have to unpack a jar).
IGNITION is a web-app... you drop it into Tomcat and its installed... then 
you drop the CLASS structure into the START folder... thats it.
If you call that URL... it will install on the clients machine... no certs 
required.

Have Fun...





----- Original Message ----- 
From: "Andrew Rapp" <alrapp@yahoo.com>
To: <users@tomcat.apache.org>
Sent: Thursday, May 24, 2007 6:39 PM
Subject: Running Embedded Tomcat from Java Web Start


> Hi All,
>
> I'm trying to launch Embedded Tomcat from Java Web Start (JNLP), but 
> without any luck so far.  I've searched high and low and found several 
> folks who have tried this approach but no one has seemed to succeed.  Just 
> to clarify, I'm not trying to run Java Web Start from Embedded Tomcat, but 
> actually the reverse: start Embedded Tomcat on the client's machine, via 
> Java Web Start.
>
> Tomcat starts but I get the following exception:
>
>            ----------> Parent Classloader:
>                sun.misc.Launcher$AppClassLoader@11b86e7
>                 org.apache.jasper.servlet.JspServlet
>                java.lang.ClassNotFoundException: 
> org.apache.jasper.servlet.JspServlet
>    at 
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1359)
>    at 
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1205)
>    at 
> org.apache.catalina.core.StandardWrapper$1.run(StandardWrapper.java:1051)
>    at java.security.AccessController.doPrivileged(Native Method)
>    at 
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1047)
>    at 
> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
>    at 
> org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3956)
>    at 
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4230)
>    at 
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
>    at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
>    at 
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
>    at 
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
>    at org.apache.catalina.startup.Embedded.start(Embedded.java:822)
>
> Apparently a classloader issue with JNLP, but I don't know how to set the 
> classloader on Tomcat.
>
> I also tried launching Embedded Tomcat via a URLClassLoader.  With the 
> URLClassLoader I get: java.security.AccessControlException: access denied 
> (java.util.PropertyPermission catalina.home write).  It seems that the 
> URLClassLoader is not running with the same privileges as the JNLP 
> classloader.
>
> I'm using the following code to start tomcat.
>
>        System.setProperty("catalina.home", getPath());
>
>        embedded = new Embedded();
>
>        Engine engine = embedded.createEngine();
>        engine.setDefaultHost("localhost");
>
>        host = embedded.createHost("localhost", getPath() + "/webapps");
>        engine.addChild(host);
>
>        Context context = embedded.createContext("", getPath() + 
> "/webapps/ROOT");
>
>        host.addChild(context);
>
>        embedded.addEngine(engine);
>
>        Connector connector = 
> embedded.createConnector((java.net.InetAddress) null, 11080, false);
>        embedded.addConnector(connector);
>        embedded.start();
>
> Any suggestions will be appreciated.
>
> Andrew
>
> 


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message