Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Republish does not work.(Republish does not work! Need to restart the server after every change. Help please!)
icon8.gif  Republish does not work. [message #488074] Fri, 25 September 2009 13:46 Go to next message
Alex  is currently offline Alex Friend
Messages: 4
Registered: September 2009
Junior Member
Hi,

I am developing a JavaEE Web Application. Since two weeks I've started using Eclipse WTP. Everything is great, except that I have a very annoying problem: everytime I change something in a file (even if it is only the home.html file), i have to restart the server to see the changes in the browser. After I save the change, the server instance says : "republishing... synchronized". But there is no change in the browser. I have to restart the server to see the change. And this is annoying because it takes about 20s.

The problem is not with the browser. I used different browsers, and cleared the browser chache. Still no change.

Here some details about my environment:
- Eclipse Galileo (the latest version for Windows)
- Tomcat 6.0.20
- Spring 2.0

Here's what i found out myself so far:
[...]\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wt pwebapps\[myWebbApp]\home.html - is refreshed when eclipse does republish
C:\Documents and Settings\[LocalUser]\Local Settings\Temp\0-[myWebbApp]\home.html - is refreshed only when I restart the server in eclipse.

PLEASE HELP ME! It is very annoying to develop this way.

10x.




Re: Republish does not work. [message #488101 is a reply to message #488074] Fri, 25 September 2009 14:41 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: andrealuciano.dessi.gmail.com

Alex ha scritto:
> Hi,
>
> I am developing a JavaEE Web Application. Since two weeks I've started
> using Eclipse WTP. Everything is great, except that I have a very
> annoying problem: everytime I change something in a file (even if it is
> only the home.html file), i have to restart the server to see the
> changes in the browser. After I save the change, the server instance
> says : "republishing... synchronized". But there is no change in the
> browser. I have to restart the server to see the change. And this is
> annoying because it takes about 20s.
>
> The problem is not with the browser. I used different browsers, and
> cleared the browser chache. Still no change.
>
> Here some details about my environment:
> - Eclipse Galileo (the latest version for Windows)
> - Tomcat 6.0.20
> - Spring 2.0
>
> Here's what i found out myself so far:
> [...]\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wt
> pwebapps\[myWebbApp]\home.html - is refreshed when eclipse does republish
> C:\Documents and Settings\[LocalUser]\Local
> Settings\Temp\0-[myWebbApp]\home.html - is refreshed only when I restart
> the server in eclipse.
>
> PLEASE HELP ME! It is very annoying to develop this way.
>
> 10x.

Hi Alex,

i always had this problem too.
When after saving files i just write a "space" in the file then save
again and wait for a second, then reload the page in the browser and
will work.

I used to do this eveytime i save a file.
so i do : save, white space in the file, save again, wait a sec, reload
the browser.

Autodeploy is so strange :S

Kind Regards, Andrea
Re: Republish does not work. [message #488113 is a reply to message #488074] Fri, 25 September 2009 15:22 Go to previous messageGo to next message
Alex  is currently offline Alex Friend
Messages: 4
Registered: September 2009
Junior Member
This does not work for me. Thanks anyway, Andrea.

If googled 4-5 hours for a solution, but still didn't found one. I've even reinstalled everything.
Re: Republish does not work. [message #488114 is a reply to message #488074] Fri, 25 September 2009 15:21 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1310
Registered: July 2009
Senior Member
Since tmp0\wtpwebapps\[myWebbApp]\home.html is being updated, the WTP
publish is working. The behavior you are seeing is between Tomcat and
the browser.

You could use the Monitor support (right-click on the server in the
Servers view and select Monitoring -> "Monitor port <your_http_port>" to
see what is transpiring between Tomcat and your browser. Knowing what's
happening between the browser and Tomcat should show why you are seeing
this behavior.

Note that with a monitor port enabled, the "Run on Server" and "Debug on
Server" will automatically pick up the monitor port number when opening
the browser. You can view the port number directly with Monitoring ->
Properties. Also, in this Properties dialog you can remove and re-add
the monitor port using your specifications, if you want to control the
monitor port number.

If it is revealed that Tomcat is returning old content for home.html
after the file has been updated, then you will need to figure out what
Tomcat caching mechanism is coming into play and how to adjust the
Tomcat configuration to eliminate it. With a default configuration of
Tomcat 6.0.20, I don't see this behavior. Refreshing the browser
displays the changes. You may want to investigate if any configuration
changes you may have made before or after creating this server in WTP as
they may have added this behavior as a side effect. I'm not that
familiar with the static file caching aspects of Tomcat, so you should
probably ask on the Tomcat Users mailing list if you need help with that.

Cheers,
Larry

Alex wrote:
> Hi,
>
> I am developing a JavaEE Web Application. Since two weeks I've started
> using Eclipse WTP. Everything is great, except that I have a very
> annoying problem: everytime I change something in a file (even if it is
> only the home.html file), i have to restart the server to see the
> changes in the browser. After I save the change, the server instance
> says : "republishing... synchronized". But there is no change in the
> browser. I have to restart the server to see the change. And this is
> annoying because it takes about 20s.
>
> The problem is not with the browser. I used different browsers, and
> cleared the browser chache. Still no change.
>
> Here some details about my environment:
> - Eclipse Galileo (the latest version for Windows)
> - Tomcat 6.0.20
> - Spring 2.0
>
> Here's what i found out myself so far:
> [...]\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wt
> pwebapps\[myWebbApp]\home.html - is refreshed when eclipse does republish
> C:\Documents and Settings\[LocalUser]\Local
> Settings\Temp\0-[myWebbApp]\home.html - is refreshed only when I restart
> the server in eclipse.
>
> PLEASE HELP ME! It is very annoying to develop this way.
>
> 10x.
>
>
>
>
>
Re: Republish does not work. [message #488130 is a reply to message #488114] Fri, 25 September 2009 16:02 Go to previous messageGo to next message
Alex  is currently offline Alex Friend
Messages: 4
Registered: September 2009
Junior Member
Hi Larry,

I've used the Monitor and came to the same conclusion. The home.html content send to the browser is the old one.

I've also analyzed the posibility that it could be a Tomcat caching problem. But since I also have a fresh Tomcat 6.0.20 instaled, I doubt that this is the problem.

But now I found out something new. If I manualy change something in the file C:\Documents and Settings\[LocalUser]\Local Settings\Temp\0-[myWebbApp]\home.html and then refresh the browser page, the changes are there. So the problem must be that the contents from [...]\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wt pwebapps\[myWebbApp]\home.html are not copied to C:\Documents and Settings\[LocalUser]\Local Settings\Temp\0-[myWebbApp]\home.html. So the big question now: who is responsable for this? Eclipse WTP or Tomcat?

Please help me! I'm opened to every ideea Smile
Re: Republish does not work. [message #488153 is a reply to message #488130] Fri, 25 September 2009 17:05 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1310
Registered: July 2009
Senior Member
Alex wrote:
> Hi Larry,
>
> I've used the Monitor and came to the same conclusion. The home.html
> content send to the browser is the old one.
> I've also analyzed the posibility that it could be a Tomcat caching
> problem. But since I also have a fresh Tomcat 6.0.20 instaled, I doubt
> that this is the problem.
> But now I found out something new. If I manualy change something in the
> file C:\Documents and Settings\[LocalUser]\Local
> Settings\Temp\0-[myWebbApp]\home.html and then refresh the browser page,
> the changes are there. So the problem must be that the contents from
> [...]\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wt
> pwebapps\[myWebbApp]\home.html are not copied to C:\Documents and
> Settings\[LocalUser]\Local Settings\Temp\0-[myWebbApp]\home.html. So the
> big question now: who is responsable for this? Eclipse WTP or Tomcat?
>
> Please help me! I'm opened to every ideea :)

Enabling antiResourceLocking might do that, but this feature is not
enabled by default. Check the WebContent/META-INF/context.xml file, if
one exists in your project. If not there, check the context.xml file
under the Servers project of your workspace. If this feature is
enabled, it would explain the behavior you are seeing.

Cheers,
Larry
Re: Republish does not work. [message #488159 is a reply to message #488153] Fri, 25 September 2009 17:48 Go to previous messageGo to next message
Alex  is currently offline Alex Friend
Messages: 4
Registered: September 2009
Junior Member
Larry Isaacs wrote on Fri, 25 September 2009 13:05
Alex wrote:
> Hi Larry,
>
> I've used the Monitor and came to the same conclusion. The home.html
> content send to the browser is the old one.
> I've also analyzed the posibility that it could be a Tomcat caching
> problem. But since I also have a fresh Tomcat 6.0.20 instaled, I doubt
> that this is the problem.
> But now I found out something new. If I manualy change something in the
> file C:\Documents and Settings\[LocalUser]\Local
> Settings\Temp\0-[myWebbApp]\home.html and then refresh the browser page,
> the changes are there. So the problem must be that the contents from
> [...]\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wt
> pwebapps\[myWebbApp]\home.html are not copied to C:\Documents and
> Settings\[LocalUser]\Local Settings\Temp\0-[myWebbApp]\home.html. So the
> big question now: who is responsable for this? Eclipse WTP or Tomcat?
>
> Please help me! I'm opened to every ideea Smile

Enabling antiResourceLocking might do that, but this feature is not
enabled by default. Check the WebContent/META-INF/context.xml file, if
one exists in your project. If not there, check the context.xml file
under the Servers project of your workspace. If this feature is
enabled, it would explain the behavior you are seeing.

Cheers,
Larry


It works! The antiResourceLocking parameter was set to true. I've disable it and now everything is ok.

Thanks a lot, Larry!
Re: Republish does not work. [message #499334 is a reply to message #488159] Fri, 20 November 2009 21:14 Go to previous messageGo to next message
Shakeel  is currently offline Shakeel Friend
Messages: 5
Registered: October 2009
Junior Member
Hi Lary,

I don't have this antResourceLocking variable set any where but still facing the same issue. What do I need to do to fix it?

Shak
Re: Republish does not work. [message #501025 is a reply to message #499334] Mon, 30 November 2009 17:46 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1310
Registered: July 2009
Senior Member
Shakeel wrote:
> Hi Lary,
>
> I don't have this antResourceLocking variable set any where but still
> facing the same issue. What do I need to do to fix it?
>
> Shak

If this is still an issue, I would start a new thread and provide the
details about your situation.

Cheers,
Larry
Re: Republish does not work. [message #506530 is a reply to message #501025] Thu, 07 January 2010 21:12 Go to previous message
No real name is currently offline No real nameFriend
Messages: 1
Registered: January 2010
Junior Member
Hello !

I have the same issue...
I am using (at home) a tomcat 5.5.25 and did not found any antResourceLocking in context.xml files.
Reading this topic, I tried successfullly Publish on server. It did reload/refresh the correct file, but I can't imagine clicking publish everytime i need to see the modifications !

I dont understand why it goes like this, whereas it works well at work...

Any idea of what I make wrong ?
(at work eclispe 3.3.2 with wtp
at home eclipse ganymede with wtp)

thx !

[Updated on: Thu, 07 January 2010 16:12]

Report message to a moderator

Previous Topic:How to write validate results to console and not popup?
Next Topic:Incomplete EAR creation/deloyment
Goto Forum:
  


Current Time: Mon Nov 24 01:29:14 GMT 2014

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

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