Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Files with long names are not republished on HTTP Preview(Need a simple workaround)
icon5.gif  Files with long names are not republished on HTTP Preview [message #1433264] Sun, 28 September 2014 13:23 Go to next message
Baruch Youssin is currently offline Baruch YoussinFriend
Messages: 29
Registered: April 2013
Junior Member
I have bumped into the following problem that appears to be a bug of Eclipse Web Tools.

I have a Static Web Project with html files which all lie in the top folder of the project (no subfolders), and debug it using HTTP preview server.
Files with short names are published and shown in my browser fine when I ask to Debug on Server.
However, files with long names (at least 30 letters but possibly less too) publish once only, and any later changes are not republished.
In other words, when I use Debug to view the file first time, it shows in my browser fine, but when I try to do it again, I see the first version only, no matter how many changes I make.

I run Eclipse 4.3.2, recently updated, on Ubuntu 12.04.

The following actions do not help: Laughing
Right-click on the server in the Servers view and tell it to Clean, or Publish, or Restart, or Stop and Start.
Delete the server and create it again (as HTTP Preview).
Project --> Clean.
Combinations of the above.
Restart Eclipse or the computer.
Go to ..metadata/.plugins/org.eclipse.wst.server.core/tmp0, delete my project, right-click on the server in the Servers view and Publish. (When I do this, my project appears again in ..metadata/.plugins/org.eclipse.wst.server.core/tmp0, and the files are up to date in it. However, when I try to Debug, an old version shows up. In fact, the files are updated when I publish by right-clicking on the server even without deleting anything in this directory.)

I have also tried to use HTTP Server (as opposed to HTTP Preview) but it does not show any files; Run On Server does not yield any response at all while Debug on Server opens a browser page which says that it cannot connect. I have tried it both with the default port 80 and with port 20080 to avoid problems with ports with small numbers.

My questions are as follows:
1. Maybe I am doing something wrong? Embarrassed
2. Is there any simple workaround? (I am going to file a bug with Eclipse but it will take time until it is fixed.)
In fact, while writing this question I have found a workaround: just view in browser files in ..metadata/.plugins/org.eclipse.wst.server.core/tmp0 after publishing them on the server as above. Anything better? Razz

Many thanks

[Updated on: Sun, 28 September 2014 13:30]

Report message to a moderator

Re: Files with long names are not republished on HTTP Preview [message #1434209 is a reply to message #1433264] Mon, 29 September 2014 20:35 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
On 9/28/2014 9:23 AM, Baruch Youssin wrote:
> I have bumped into the following problem that appears to be a bug of
> Eclipse Web Tools.
>
> I have a Static Web Project with html files which all lie in the top
> folder of the project (no subfolders), and debug it using HTTP preview
> server.
> Files with short names are published and shown in my browser fine when I
> ask to Debug on Server.
> However, files with long names (at least 30 letters but possibly less
> too) publish once only, and any later changes are not republished.
> In other words, when I use Debug to view the file first time, it shows
> in my browser fine, but when I try to do it again, I see the first
> version only, no matter how many changes I make.
>
> I run Eclipse 4.3.2, recently updated, on Ubuntu 12.04.
>
> The following actions do not help: :lol: Right-click on the server in
> the Servers view and tell it to Clean, or Publish, or Restart, or Stop
> and Start.
> Delete the server and create it again (as HTTP Preview).
> Project --> Clean.
> Combinations of the above.
> Restart Eclipse or the computer.
> Go to ..metadata/.plugins/org.eclipse.wst.server.core/tmp0, delete my
> project, right-click on the server in the Servers view and Publish.
> (When I do this, my project appears again in
> ..metadata/.plugins/org.eclipse.wst.server.core/tmp0, and the files are
> up to date in it. However, when I try to Debug, an old version shows
> up. In fact, the files are updated when I publish by right-clicking on
> the server even without deleting anything in this directly.)
>
> I have also tried to use HTTP Server (as opposed to HTTP Preview) but it
> does not show any files; Run On Server does not yield any response at
> all while Debug on Server opens a browser page which says that it cannot
> connect.
> My questions are as follows:
> 1. Maybe I am doing something wrong? :blush: 2. Is there any simple
> workaround? (I am going to file a bug with Eclipse but it will take
> time until it is fixed.)
> In fact, while writing this question I have found a workaround: just
> view in browser files in
> ..metadata/.plugins/org.eclipse.wst.server.core/tmp0 after publishing
> them on the server as above. Anything better? :p
> Many thanks

If I'm reading your post correctly, is sounds like publishing is working
correctly and the behavior you are seeing is coming from browser
caching. Are you using the internal browser, or an external one?

Cheers,
Larry
Re: Files with long names are not republished on HTTP Preview [message #1434545 is a reply to message #1434209] Tue, 30 September 2014 08:18 Go to previous messageGo to next message
Baruch Youssin is currently offline Baruch YoussinFriend
Messages: 29
Registered: April 2013
Junior Member
Larry: Thanks for your reply. I am using external Firefox 32.0.3 for Ubuntu.
Did I understand you correctly that you are saying that the problem is not in the Eclipse but rather in Firefox that keeps the cache of my files and fails to update it?
Here is what I have done to test your conjecture.
I have created a new Static Web project in Eclipse with HTTP Preview runtime. I have created a new file in it, NewFile-test-test-test-test-test-test.html, with the following contents:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="description" content="Insert a great description here">
<meta name="keywords" content="keyword phrase 1, keyword phrase 2, etc.">
<title>Insert title here</title>
</head>
<body>

</body>
</html>

I tried Debug on Server and Firefox gave me Error 404 - Not Found page while the project with the file were present in ..metadata/.plugins/org.eclipse.wst.server.core/tmp0.
(This is another manifestation of the same problem that I encountered after posting this question.)
I told Firefox to Clear its Web Content Cache, and it did, showing cache size 0. I tried to Debug on Server with the same result.
I told Firefox to Quit, started it again and tried to Debug on Server, with the same result.
Any ideas?
Re: Files with long names are not republished on HTTP Preview [message #1434746 is a reply to message #1434545] Tue, 30 September 2014 14:21 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
On 9/30/2014 4:19 AM, Baruch Youssin wrote:
> Larry: Thanks for your reply. I am using external Firefox 32.0.3 for
> Ubuntu.
> Did I understand you correctly that you are saying that the problem is
> not in the Eclipse but rather in Firefox that keeps the cache of my
> files and fails to update it?
> Here is what I have done to test your conjecture.
> I have created a new Static Web project in Eclipse with HTTP Preview
> runtime. I have created a new file in it,
> NewFile-test-test-test-test-test-test.html, with the following contents:
> <!DOCTYPE html>
> <html>
> <head>
> <meta charset="UTF-8">
> <meta name="description" content="Insert a great description here">
> <meta name="keywords" content="keyword phrase 1, keyword phrase 2, etc.">
> <title>Insert title here</title>
> </head>
> <body>
>
> </body>
> </html>
>
> I tried Debug on Server and Firefox gave me Error 404 - Not Found page
> while the project with the file were present in
> ..metadata/.plugins/org.eclipse.wst.server.core/tmp0.
> (This is another manifestation of the same problem that I encountered
> after posting this question.)
> I told Firefox to Clear its Web Content Cache, and it did, showing cache
> size 0. I tried to Debug on Server with the same result.
> I told Firefox to Quit, started it again and tried to Debug on Server,
> with the same result.
> Any ideas?

I can do this simple test on Windows 7 and it works fine for me. If you
are seeing the project show up
under.metadata/.plugins/org.eclipse.wst.server.core/tmp0, then
publishing has done it's job. What is the URL that shows up in the browser?

Cheers,
Larry
Re: Files with long names are not republished on HTTP Preview [message #1434907 is a reply to message #1434746] Tue, 30 September 2014 19:50 Go to previous messageGo to next message
Baruch Youssin is currently offline Baruch YoussinFriend
Messages: 29
Registered: April 2013
Junior Member
Larry: The URL I see in Firefox when it shows me the Error 404 - Not Found page, is correct:
http://localhost:8080/test/NewFile-test-test-test-test-test-test.html
This page lists the available projects on this server; it does not list this test project but lists the other project I have, which used to have trouble republishing, but now republishes properly.
The next step to check your point that the problem is with Firefox rather than with Eclipse, is to use another browser.
I tried viewing this URL in Wine Internet Explorer that runs under Wine on Ubuntu (it is a port of MS Windows to Linux, very limited); it showed me the same Error 404 page as Firefox.
It seems to me that this runs against your position.
Maybe publishing involves an additional step between ..metadata/.plugins/org.eclipse.wst.server.core/tmp0 and the browser?
Thanks
Baruch
Re: Files with long names are not republished on HTTP Preview [message #1435000 is a reply to message #1434907] Tue, 30 September 2014 22:54 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
On 9/30/2014 3:50 PM, Baruch Youssin wrote:
> Larry: The URL I see in Firefox when it shows me the Error 404 - Not
> Found page, is correct:
> http://localhost:8080/test/NewFile-test-test-test-test-test-test.html
> This page lists the available projects on this server; it does not list
> this test project but lists the other project I have, which used to have
> trouble republishing, but now republishes properly.
> The next step to check your point that the problem is with Firefox
> rather than with Eclipse, is to use another browser.
> I tried viewing this URL in Wine Internet Explorer that runs under Wine
> on Ubuntu (it is a port of MS Windows to Linux, very limited); it showed
> me the same Error 404 page as Firefox.
> It seems to me that this runs against your position.
> Maybe publishing involves an additional step between
> ..metadata/.plugins/org.eclipse.wst.server.core/tmp0 and the browser?
> Thanks
> Baruch

When you start the server, some output should appear in the Console
view. What shows up there?

Cheers,
Larry
Re: Files with long names are not republished on HTTP Preview [message #1435592 is a reply to message #1435000] Wed, 01 October 2014 18:30 Go to previous message
Baruch Youssin is currently offline Baruch YoussinFriend
Messages: 29
Registered: April 2013
Junior Member
Larry: Thanks for thinking more.
To your question: I deleted the existing server, created a new HTTP Preview server adding to it only the test project (but not the REAL project I work on), and started it. At this point the following output appeared in the Console view (which had been empty - no consoles - before that):

HTTP Preview at localhost [HTTP Preview] /usr/lib/jvm/jdk 1.7.0/jre/bin/java
Starting preview server on port 8080

Modules:
  test (/test)

2014-10-01 19:38:59.686:INFO:oejs.Server:jetty-8.1.14.v20131031
2014-10-01 19:38:59.728:INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:8080


After that I told Eclipse to Debug on Server, and at this point Firefox showed me my empty page (with the correct title); it did not do this before. However, when I opened the page from my real project and asked to Debug on Server, Eclipse promptly added it to the server but then Firefox showed me the Error 404 page which said that only my test project was known to it, not the real one.

To make sure my real project can be debugged, I deleted the Server again, created a new one, added to it only my real project, started the server, asked to Debug on Server a page from my real project, and it showed fine. After that I tried to Debug on Server the page from the test project and it also showed fine!
Nevertheless, when I modified the file in the test project by adding text in the body and asked to Debug on Server, my changes did not showed up in Firefox; only the original page showed up.

Note the bug did not need two projects to manifest itself: in the beginning I had only one Web project (in addition to many Java projects) and only one file in it, with a short name. When I renamed that file making its name long, the changes stopped showing up when I asked to Debug on Server. So the bug did manifest itself with one Web project.

In my initial post, I indicated that I was going to file a bug with Eclipse on this subject. I did this promptly, even before your first answer. Here is the link: https://bugs.eclipse.org/bugs/show_bug.cgi?id=445282
Previous Topic:HTTP Error 500 for Web Service Explorer
Next Topic:Define a New Server choosing GlassFish 3.1 gives Internal Error
Goto Forum:
  


Current Time: Mon Jun 25 16:09:28 GMT 2018

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

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

Back to the top