|Re: Tomcat redeploys web application when a JSP get changed [message #222641]
||Tue, 14 October 2008 02:14
| Mohsen Saboorian
Registered: July 2009
I think I found where the issue come from, but still no workaround.
I have two projects, one is a simple Java project which performs DBMS data
access (say p1), and another web module (say p2). Not all of my .jar files
are copied in the WEB-INF/lib of p2 (webmodule) project, but they are
actually referenced through "Java EE Module Dependencies", so that Eclipse
copies p1 and p2 projects' dependencies to the target module deployment
p1 project has Utility Module facet, so that whenever it changes a new jar
file is created and exported to p2's WEB-INF/lib. The problem is that
whenever I change a simple .jsp page (in p2), a new p1.jar is created in
WEB-INF/lib and this is the cause that Tomcat reloads the module.
There is also another issue which I believe happens because of another facet
set in my p1 project. I have eclipselink.jar as a dependency in my pure java
project (p1). There is also a JPA facet set in p1 project. Whenever I change
a jsp, not only p1.jar is modified, but also eclipselink.jar is re-copied in
Isn't it a bug in WTP facet engine?
"Larry Isaacs" <Larry.Isaacs@sas.com> wrote in message
> Just changing a JSP shouldn't cause a redeploy. I did some simple
> testing with Eclipse 3.4.1 and WTP 3.0.2 to confirm this. Your
> redeployments, suggest something else is getting published that is
> triggering the reload. Rewriting of server.xml during each publish is
> normal and wouldn't trigger the reload.
> You can try right-clicking on the Tomcat server in the Servers view and
> selecting "Clean...". This will cause a full publish for all projects
> on the server and may clean out some error in the publish data that
> might be causing some additional file(s) to be unnecessarily published.
> If that doesn't help we'll have to dig deeper to find what is
> triggering the reloads.
> Mohsen Saboorian wrote:
>> I mean an application redeploy. My webapp is reloaded if any page
>> Any workaround?
>> "Larry Isaacs" <Larry.Isaacs@sas.com> wrote in message
>>> Mohsen Saboorian wrote:
>>>> I have two duplicate web applications, one in Ganyede 3.4.0 and one in
>>>> 3.4.1. In both projects "Automacitally publish when resources change"
>>>> selected. In 3.4.0 my configuration works fine and tomcat doesn't
>>>> redeploy application on a jsp change, but the new 3.4.1 redeploys
>>>> as I change a jsp. When TC decides a redeploy? I also chacked for
>>>> date of web.xml but it was not modified. I've noticed that whenever a
>>>> is changed, org.eclipse.wst.server.core/tmpx/conf/server.xml is also
>>>> modified (in both projects).
>>>> Any hint how to prevent redeploying on page changes?
>>> Rather than guess, what exactly do you mean by "redeploys tomcat". It's
>>> not clear whether you are referring to something Tomcat is doing, like
>>> reloading a webapp, or something WTP is doing, like publishing the
>>> or asking for a restart.