|
Re: Republish does not work. [message #488101 is a reply to message #488074] |
Fri, 25 September 2009 14:41 |
Eclipse User |
|
|
|
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 #488114 is a reply to message #488074] |
Fri, 25 September 2009 15:21 |
Larry Isaacs Messages: 1354 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 #488159 is a reply to message #488153] |
Fri, 25 September 2009 17:48 |
Alex 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
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 #506530 is a reply to message #501025] |
Thu, 07 January 2010 21:12 |
No real name 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
|
|
|
Powered by
FUDForum. Page generated in 0.04837 seconds