Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Tomcat 5.5 - Serve module without publishing
Tomcat 5.5 - Serve module without publishing [message #194952] Tue, 26 June 2007 08:00 Go to next message
Eclipse UserFriend
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 #194960 is a reply to message #194952] Tue, 26 June 2007 08:02 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cooll.free.fr

Lionel wrote:
> Could someone explain me how my project has to be configured to use
> this new functionnality (Serve module without publishing).

I use a fresh install of 2.0 RC4.
Re: Tomcat 5.5 - Serve module without publishing [message #194992 is a reply to message #194952] Tue, 26 June 2007 12:37 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
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.

Cheers,
Larry

Lionel wrote:
> 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 Go to previous messageGo to next message
Eclipse UserFriend
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 #195014 is a reply to message #195006] Tue, 26 June 2007 14:19 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
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.

Larry

Lionel wrote:
> 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 Go to previous message
Eclipse UserFriend
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.
Previous Topic:Can't get started with webtools
Next Topic:Warnings in plugin.xml for facets? What is the preset replacement since it is deprecated
Goto Forum:
  


Current Time: Thu Mar 28 10:01:33 GMT 2024

Powered by FUDForum. Page generated in 0.04002 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top