Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Hot-edit of JSP files with Tomcat 6.0 - should it require a republish?
Hot-edit of JSP files with Tomcat 6.0 - should it require a republish? [message #200106] Thu, 20 September 2007 14:08 Go to next message
Dave Syer is currently offline Dave Syer
Messages: 95
Registered: July 2009
Member
When I edit a JSP (actually .jspx) WTP detects the change and republishes
the whole application. This really slows things down. Isn't it possible to
simply reload the file that changed? I'm sure Tomcat can do it (haven't
tried it standalone in an exploded war for a while, but it used to work last
time I looked).
Re: Hot-edit of JSP files with Tomcat 6.0 - should it require a republish? [message #200121 is a reply to message #200106] Thu, 20 September 2007 14:34 Go to previous messageGo to next message
Eclipse User
Originally posted by: adam.hardy.no.spam.cyberspaceroad.spam

Dave Syer on 20/09/07 15:08, wrote:
> When I edit a JSP (actually .jspx) WTP detects the change and republishes
> the whole application. This really slows things down. Isn't it possible to
> simply reload the file that changed? I'm sure Tomcat can do it (haven't
> tried it standalone in an exploded war for a while, but it used to work last
> time I looked).

Happened to me a while back while I was experimenting with different
configurations.

Now I have tomcat set up with the 'use tomcat installation (takes control)'
option, which is one config option that might control when the context is
reloaded. Another option could be the xml in your
..settings/org.eclipse.wst.common.component file. Do you have it like this (or
similar - mine's for maven):

<wb-resource deploy-path="/" source-path="/src/main/webapp"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/test/java"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/test/resources"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/adam"/>
<property name="java-output-path" value="build/classes"/>
<property name="context-root" value="tradingcode"/>
Re: Hot-edit of JSP files with Tomcat 6.0 - should it require a republish? [message #200210 is a reply to message #200121] Fri, 21 September 2007 12:30 Go to previous messageGo to next message
Dave Syer is currently offline Dave Syer
Messages: 95
Registered: July 2009
Member
My org.*.component file looks identical to yours (except for some additional
<dependent-module/> elements). So I guess it's not that.

What was the other thing you mentioned "* (takes control)"? I don't
remember ever having the choice. Where did that show up?

"adam hardy" <adam.hardy@no.spam.cyberspaceroad.spam> wrote in message
news:fcu0e7$dsp$1@build.eclipse.org...>
> Now I have tomcat set up with the 'use tomcat installation (takes
> control)' option, which is one config option that might control when the
> context is reloaded. Another option could be the xml in your
> .settings/org.eclipse.wst.common.component file. Do you have it like this
> (or similar - mine's for maven):
>
> <wb-resource deploy-path="/" source-path="/src/main/webapp"/>
> <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
> <wb-resource deploy-path="/WEB-INF/classes"
> source-path="/src/main/resources"/>
> <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/test/java"/>
> <wb-resource deploy-path="/WEB-INF/classes"
> source-path="/src/test/resources"/>
> <wb-resource deploy-path="/WEB-INF/classes" source-path="/adam"/>
> <property name="java-output-path" value="build/classes"/>
> <property name="context-root" value="tradingcode"/>
>
Re: Hot-edit of JSP files with Tomcat 6.0 - should it require a republish? [message #200307 is a reply to message #200210] Sun, 23 September 2007 18:06 Go to previous messageGo to next message
Eclipse User
Originally posted by: adam.hardy.no.spam.cyberspaceroad.spam

Double-click your server in the Servers view. In the left-hand half of the
'Overview' window that appears, the second box down is the 'Server locations'
config.

Dave Syer on 21/09/07 13:30, wrote:
> My org.*.component file looks identical to yours (except for some additional
> <dependent-module/> elements). So I guess it's not that.
>
> What was the other thing you mentioned "* (takes control)"? I don't
> remember ever having the choice. Where did that show up?
>
> "adam hardy" <adam.hardy@no.spam.cyberspaceroad.spam> wrote in message
> news:fcu0e7$dsp$1@build.eclipse.org...>
>> Now I have tomcat set up with the 'use tomcat installation (takes
>> control)' option, which is one config option that might control when the
>> context is reloaded. Another option could be the xml in your
>> .settings/org.eclipse.wst.common.component file. Do you have it like this
>> (or similar - mine's for maven):
>>
>> <wb-resource deploy-path="/" source-path="/src/main/webapp"/>
>> <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
>> <wb-resource deploy-path="/WEB-INF/classes"
>> source-path="/src/main/resources"/>
>> <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/test/java"/>
>> <wb-resource deploy-path="/WEB-INF/classes"
>> source-path="/src/test/resources"/>
>> <wb-resource deploy-path="/WEB-INF/classes" source-path="/adam"/>
>> <property name="java-output-path" value="build/classes"/>
>> <property name="context-root" value="tradingcode"/>
>>
>
>
Re: Hot-edit of JSP files with Tomcat 6.0 - should it require a republish? [message #200320 is a reply to message #200307] Sun, 23 September 2007 18:15 Go to previous messageGo to next message
Dave Syer is currently offline Dave Syer
Messages: 95
Registered: July 2009
Member
That option is greyed out. What else am I doing differently?

"adam hardy" <adam.hardy@no.spam.cyberspaceroad.spam> wrote in message
news:fd6a00$vj4$1@build.eclipse.org...
> Double-click your server in the Servers view. In the left-hand half of the
> 'Overview' window that appears, the second box down is the 'Server
> locations' config.
>
> Dave Syer on 21/09/07 13:30, wrote:
>> My org.*.component file looks identical to yours (except for some
>> additional <dependent-module/> elements). So I guess it's not that.
>>
>> What was the other thing you mentioned "* (takes control)"? I don't
>> remember ever having the choice. Where did that show up?
>>
>> "adam hardy" <adam.hardy@no.spam.cyberspaceroad.spam> wrote in message
>> news:fcu0e7$dsp$1@build.eclipse.org...>
>>> Now I have tomcat set up with the 'use tomcat installation (takes
>>> control)' option, which is one config option that might control when the
>>> context is reloaded. Another option could be the xml in your
>>> .settings/org.eclipse.wst.common.component file. Do you have it like
>>> this (or similar - mine's for maven):
>>>
>>> <wb-resource deploy-path="/" source-path="/src/main/webapp"/>
>>> <wb-resource deploy-path="/WEB-INF/classes"
>>> source-path="/src/main/java"/>
>>> <wb-resource deploy-path="/WEB-INF/classes"
>>> source-path="/src/main/resources"/>
>>> <wb-resource deploy-path="/WEB-INF/classes"
>>> source-path="/src/test/java"/>
>>> <wb-resource deploy-path="/WEB-INF/classes"
>>> source-path="/src/test/resources"/>
>>> <wb-resource deploy-path="/WEB-INF/classes" source-path="/adam"/>
>>> <property name="java-output-path" value="build/classes"/>
>>> <property name="context-root" value="tradingcode"/>
>>>
>>
Re: Hot-edit of JSP files with Tomcat 6.0 - should it require a republish? [message #200378 is a reply to message #200320] Mon, 24 September 2007 13:43 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry Isaacs
Messages: 1305
Registered: July 2009
Senior Member
The text at the top of the Server Locations section likely explains it,
i.e. "Server must be published with no modules present to make changes."

Also, with respect to publishing just a changed JSP causing a republish
or reload, it should not normally occur. The only situation that I'm
aware of that it will always occur is if you have selected "Use Tomcat
installation..." and the project added to that server has a Java utility
project as a J2EE Module Dependency. The utility project's jar gets
rebuilt on every publish, triggering the reload. I hope to fix that in
WTP 3.0.

Cheers,
Larry

Dave Syer wrote:
> That option is greyed out. What else am I doing differently?
>
> "adam hardy" <adam.hardy@no.spam.cyberspaceroad.spam> wrote in message
> news:fd6a00$vj4$1@build.eclipse.org...
>> Double-click your server in the Servers view. In the left-hand half of the
>> 'Overview' window that appears, the second box down is the 'Server
>> locations' config.
>>
>> Dave Syer on 21/09/07 13:30, wrote:
>>> My org.*.component file looks identical to yours (except for some
>>> additional <dependent-module/> elements). So I guess it's not that.
>>>
>>> What was the other thing you mentioned "* (takes control)"? I don't
>>> remember ever having the choice. Where did that show up?
>>>
>>> "adam hardy" <adam.hardy@no.spam.cyberspaceroad.spam> wrote in message
>>> news:fcu0e7$dsp$1@build.eclipse.org...>
>>>> Now I have tomcat set up with the 'use tomcat installation (takes
>>>> control)' option, which is one config option that might control when the
>>>> context is reloaded. Another option could be the xml in your
>>>> .settings/org.eclipse.wst.common.component file. Do you have it like
>>>> this (or similar - mine's for maven):
>>>>
>>>> <wb-resource deploy-path="/" source-path="/src/main/webapp"/>
>>>> <wb-resource deploy-path="/WEB-INF/classes"
>>>> source-path="/src/main/java"/>
>>>> <wb-resource deploy-path="/WEB-INF/classes"
>>>> source-path="/src/main/resources"/>
>>>> <wb-resource deploy-path="/WEB-INF/classes"
>>>> source-path="/src/test/java"/>
>>>> <wb-resource deploy-path="/WEB-INF/classes"
>>>> source-path="/src/test/resources"/>
>>>> <wb-resource deploy-path="/WEB-INF/classes" source-path="/adam"/>
>>>> <property name="java-output-path" value="build/classes"/>
>>>> <property name="context-root" value="tradingcode"/>
>>>>
>
Re: Hot-edit of JSP files with Tomcat 6.0 - should it require a republish? [message #200640 is a reply to message #200378] Wed, 26 September 2007 17:00 Go to previous messageGo to next message
Dave Syer is currently offline Dave Syer
Messages: 95
Registered: July 2009
Member
"Larry Isaacs" <Larry.Isaacs@sas.com> wrote in message
news:fd8euq$dno$1@build.eclipse.org...
> ... The only situation that I'm aware of that it will always occur is if
> you have selected "Use Tomcat installation..." and the project added to
> that server has a Java utility project as a J2EE Module Dependency.

Unfortunately, the "only" situation corresponds to a large proportion of
real life use cases? How many web projects do *not* have another project as
a module dependency? Only something pretty simple.

Surely if the JSP is in the web project it shouldn't trigger a rebuild of
the (Java) module dependencies?

> I hope to fix that in WTP 3.0.

Good to know. Thanks.
Re: Hot-edit of JSP files with Tomcat 6.0 - should it require a republish? [message #201725 is a reply to message #200378] Wed, 10 October 2007 07:52 Go to previous messageGo to next message
Dave Syer is currently offline Dave Syer
Messages: 95
Registered: July 2009
Member
Larry,

In case it helps with your 3.0 effort...

I had some success with editing the Tomcat server.xml manually. It seems to
work (reloading JSPs) as long as the only thing I change is a JSP and that
is in the web project. The change to server.xml is to set
autoDeploy="false" in the <Host/> element. Can't say I understand what that
did, but maybe someone else can explain?

Dave.

"Larry Isaacs" <Larry.Isaacs@sas.com> wrote in message
news:fd8euq$dno$1@build.eclipse.org...
> The text at the top of the Server Locations section likely explains it,
> i.e. "Server must be published with no modules present to make changes."
>
> Also, with respect to publishing just a changed JSP causing a republish or
> reload, it should not normally occur. The only situation that I'm aware
> of that it will always occur is if you have selected "Use Tomcat
> installation..." and the project added to that server has a Java utility
> project as a J2EE Module Dependency. The utility project's jar gets
> rebuilt on every publish, triggering the reload. I hope to fix that in
> WTP 3.0.
>
> Cheers,
> Larry
>
> Dave Syer wrote:
>> That option is greyed out. What else am I doing differently?
>>
>> "adam hardy" <adam.hardy@no.spam.cyberspaceroad.spam> wrote in message
>> news:fd6a00$vj4$1@build.eclipse.org...
>>> Double-click your server in the Servers view. In the left-hand half of
>>> the 'Overview' window that appears, the second box down is the 'Server
>>> locations' config.
>>>
>>> Dave Syer on 21/09/07 13:30, wrote:
>>>> My org.*.component file looks identical to yours (except for some
>>>> additional <dependent-module/> elements). So I guess it's not that.
>>>>
>>>> What was the other thing you mentioned "* (takes control)"? I don't
>>>> remember ever having the choice. Where did that show up?
>>>>
>>>> "adam hardy" <adam.hardy@no.spam.cyberspaceroad.spam> wrote in message
>>>> news:fcu0e7$dsp$1@build.eclipse.org...>
>>>>> Now I have tomcat set up with the 'use tomcat installation (takes
>>>>> control)' option, which is one config option that might control when
>>>>> the context is reloaded. Another option could be the xml in your
>>>>> .settings/org.eclipse.wst.common.component file. Do you have it like
>>>>> this (or similar - mine's for maven):
>>>>>
>>>>> <wb-resource deploy-path="/" source-path="/src/main/webapp"/>
>>>>> <wb-resource deploy-path="/WEB-INF/classes"
>>>>> source-path="/src/main/java"/>
>>>>> <wb-resource deploy-path="/WEB-INF/classes"
>>>>> source-path="/src/main/resources"/>
>>>>> <wb-resource deploy-path="/WEB-INF/classes"
>>>>> source-path="/src/test/java"/>
>>>>> <wb-resource deploy-path="/WEB-INF/classes"
>>>>> source-path="/src/test/resources"/>
>>>>> <wb-resource deploy-path="/WEB-INF/classes" source-path="/adam"/>
>>>>> <property name="java-output-path" value="build/classes"/>
>>>>> <property name="context-root" value="tradingcode"/>
>>>>>
>>
Re: Hot-edit of JSP files with Tomcat 6.0 - should it require a republish? [message #210633 is a reply to message #200378] Thu, 20 March 2008 14:29 Go to previous message
Eclipse User
Originally posted by: sheremeta.greg.gmail.com

For anyone else who stumbles across this... I had the same problem, and
it wasn't caused by the use case Larry suggested. My problem was that I
had imported a co-worker's RAD project into my Europa install. Needless
to say, not a WTP problem and pretty stupid on my part. Everything
seemed to work just fine, except it would always reload the context
every time I changed a JSP.

I ripped out the .project, .classpath, .settings, and .metadata, made a
new Dynamic Web project (over the existing code), and now I'm enjoying
the beauty of hot-editing my JSPs. :-)

Thanks guys!

Greg

Larry Isaacs wrote:
> The text at the top of the Server Locations section likely explains it,
> i.e. "Server must be published with no modules present to make changes."
>
> Also, with respect to publishing just a changed JSP causing a republish
> or reload, it should not normally occur. The only situation that I'm
> aware of that it will always occur is if you have selected "Use Tomcat
> installation..." and the project added to that server has a Java utility
> project as a J2EE Module Dependency. The utility project's jar gets
> rebuilt on every publish, triggering the reload. I hope to fix that in
> WTP 3.0.
>
> Cheers,
> Larry
>
> Dave Syer wrote:
>> That option is greyed out. What else am I doing differently?
>>
>> "adam hardy" <adam.hardy@no.spam.cyberspaceroad.spam> wrote in message
>> news:fd6a00$vj4$1@build.eclipse.org...
>>> Double-click your server in the Servers view. In the left-hand half
>>> of the 'Overview' window that appears, the second box down is the
>>> 'Server locations' config.
>>>
>>> Dave Syer on 21/09/07 13:30, wrote:
>>>> My org.*.component file looks identical to yours (except for some
>>>> additional <dependent-module/> elements). So I guess it's not that.
>>>>
>>>> What was the other thing you mentioned "* (takes control)"? I don't
>>>> remember ever having the choice. Where did that show up?
>>>>
>>>> "adam hardy" <adam.hardy@no.spam.cyberspaceroad.spam> wrote in
>>>> message news:fcu0e7$dsp$1@build.eclipse.org...>
>>>>> Now I have tomcat set up with the 'use tomcat installation (takes
>>>>> control)' option, which is one config option that might control
>>>>> when the context is reloaded. Another option could be the xml in
>>>>> your .settings/org.eclipse.wst.common.component file. Do you have
>>>>> it like this (or similar - mine's for maven):
>>>>>
>>>>> <wb-resource deploy-path="/" source-path="/src/main/webapp"/>
>>>>> <wb-resource deploy-path="/WEB-INF/classes"
>>>>> source-path="/src/main/java"/>
>>>>> <wb-resource deploy-path="/WEB-INF/classes"
>>>>> source-path="/src/main/resources"/>
>>>>> <wb-resource deploy-path="/WEB-INF/classes"
>>>>> source-path="/src/test/java"/>
>>>>> <wb-resource deploy-path="/WEB-INF/classes"
>>>>> source-path="/src/test/resources"/>
>>>>> <wb-resource deploy-path="/WEB-INF/classes" source-path="/adam"/>
>>>>> <property name="java-output-path" value="build/classes"/>
>>>>> <property name="context-root" value="tradingcode"/>
>>>>>
>>
Previous Topic:NullPointerException when publishing WAR files to JBoss since 2.0.2
Next Topic:SetPropertiesRule error
Goto Forum:
  


Current Time: Mon Sep 15 09:37:03 GMT 2014

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

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