tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Gordon <adam.n.gor...@gmail.com>
Subject Re: Classpath issues with Embedded Tomcat 7
Date Thu, 19 Apr 2012 20:59:31 GMT
Chris-

> If this is an update, why not reply to your original thread? It's
> difficult to keep everything in context when you start a new thread.

I got in trouble for using Nabble and my original message never
posted, just the update.  Since I wasn't sure how to handle or correct
it all I just created a new thread knowing I'd probably get in trouble
again.  C'est la vie.

-------

As far as the issues I was having.  I had WEB-INF/classes in my
classpath so that it could find my main class and WEB-INF/classes also
contained all my servlets, Spring services, GWT code, etc... hence the
third-party library dependencies for SLF4J, GWT, Spring, etc...

To solve, I moved the four required JARs (the three tomcat ones and
the ECJ JAR) to a separate directory and also created the directory
structure for the package in which my main class lives (e.g.
com/foo/bar/MainClass) and then just ran:

java -cp lib:lib/tomcat-embed-core-7.0.27.jar:lib/tomcat-juli-7.0.27.jar:lib/tomcat-embed-jasper-7.0.27.jar:lib/ecj-3.7.1.jar
com.foo.bar.MainClass

and everything worked correctly.

As an FYI, the docs say Tomcat provides a sensible default for a temp
dir which is why I didn't set one.

Thanks,

--adam

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


Mime
View raw message