Tomcat 5.5 - Serve module without publishing [message #194952] |
Tue, 26 June 2007 08:00 |
Eclipse User |
|
|
|
Originally posted by: cooll.free.fr
Hello !
Could someone explain me how my project has to be configured to use this new
functionnality (Serve module without publishing). This seems to be the
feature I've been waiting for sooooo long (no need to publish and restart
tomcat for each jsp or static file change).
when I check this checkbox on a working project, I get a
java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener on
tomcat startup.
Guess it needs some build path configuration, but I can't figure out which.
(remove tomcat from Librairies and manually add jars to build path ?)
Thanks.
By the way, is it supposed to work with a dependant project ?
|
|
|
|
|
Re: Tomcat 5.5 - Serve module without publishing [message #195006 is a reply to message #194992] |
Tue, 26 June 2007 13:47 |
Eclipse User |
|
|
|
Originally posted by: cooll.free.fr
Larry Isaacs wrote:
> Use of this feature shouldn't require any changes to your project(s),
> nor changes to the Tomcat configuration unless you have security
> enabled. However, it does change how things work internally. Tomcat's Web
> application classloader is replaced with one provided by
> Web Tools that supports configuration to access resources where they
> live in your workspace. There could be something unique about your
> situation that is causing this classloader difficulties. I would
> need more detail about your scenario before I could make a guess as
> to what is causing this.
You're right.
I tried with another project that does not use a custom security realm and
it works fine.
the only (obvious) update I had to do was to move the build output to
web-inf/classes instead of build/classes.
|
|
|
|
Re: Tomcat 5.5 - Serve module without publishing [message #195022 is a reply to message #195014] |
Tue, 26 June 2007 15:17 |
Eclipse User |
|
|
|
Originally posted by: cooll.free.fr
Larry Isaacs wrote:
> The main side effect of the Web Tools provided classloader is that the
> protectionDomain associated with loaded classes ceases to be a single
> domain, but different domains depending on where the resources are
> located in your workspace. This appears to impact your custom
> security realm. Unfortunately, I can't promise there won't be
> different side effects from switching your build output to
> WEB-INF/classes (I assume under your WebContent folder). If you can
> construct a simple project that can demonstrate the problem, I'll
> investigate whether there is a better workaround. At minimum, it
> would help me document the issue. Thanks.
The only reason why I moved the build output is that I use a jar that loads
a ResourceBundle using
ResourceBundle.getBundle("myBundle", locale,
Thread.currentThread().getContextClassLoader()) which returns the property
file of the jar instead of the property file of my application context (they
have the same name).
Removing this property file from the jar allowed me to output to
build/classes.
|
|
|
Powered by
FUDForum. Page generated in 0.04002 seconds