404 error bug in Internal Web Browser [message #218123] |
Thu, 24 July 2008 12:49 |
Eclipse User |
|
|
|
Originally posted by: d.leader.bio.gla.ac.uk
This is a description of another - more annoying- bug I encountered using
Eclipse for Servlets. As in my last posting my configuration is as follows:
I'm using v. 3.4 of eclipsee-jee for Mac OS X, running under OS X 10.4 on
a PPC processor. I have Tomcat version 4.1 (from Server Logistics) running
on localhost, which I'm switching off before using as the virtual server.
I'm using JVM 1.5 - the Mac default.
The situation is that I set up a simple (or complex) servlet with an html
page in the WebContent directory at the same level as META-INF and WEB-INF
calling the servlet. (It's not relevant, but I use a relative path, so if
the project is called myProject and the servlet is mapped to a url of
myServlet, then the html page, start.html, will have a link <a
href="/myProject/myServlet">Execute</a>.)
OK, I set this up and get it working ok on the internal web browser, shut
everything down, go home, come back next day and try to run it again.
Typically (but not invariably) I get a 404 with the url
http://localhost:8080/myProject/start.html in the url entry field. Same
result copying and pasting into an external browser. Try
http://localhost:8080/myProject/ and nothing is listed.
At this stage I start kicking tyres and banging the engine: Rebuilding,
cleaning, removing the project from the virtual server (this seems
necessary but I'm not sure it's sufficient) and eventually
http://localhost:8080/myProject/ will list my start.html file. Click on it
and I get a 404 again (cache) but a reload clears and all is well.
This is time-wasting and infuriating as I don't know which kick does the
trick. Yesterday I got it on four consecutive servlets I'd previously set
up to demonstrate. Today the first one I checked was OK, but the second
showed this behaviour. It cleared after I removed the project from the
virtual server.
Anyone seen this before or can suggest a solution?
David
|
|
|
Re: 404 error bug in Internal Web Browser [message #218131 is a reply to message #218123] |
Thu, 24 July 2008 14:40 |
Larry Isaacs Messages: 1354 Registered: July 2009 |
Senior Member |
|
|
David Leader wrote:
> This is a description of another - more annoying- bug I encountered
> using Eclipse for Servlets. As in my last posting my configuration is as
> follows:
>
> I'm using v. 3.4 of eclipsee-jee for Mac OS X, running under OS X 10.4
> on a PPC processor. I have Tomcat version 4.1 (from Server Logistics)
> running on localhost, which I'm switching off before using as the
> virtual server. I'm using JVM 1.5 - the Mac default.
>
> The situation is that I set up a simple (or complex) servlet with an
> html page in the WebContent directory at the same level as META-INF and
> WEB-INF calling the servlet. (It's not relevant, but I use a relative
> path, so if the project is called myProject and the servlet is mapped to
> a url of myServlet, then the html page, start.html, will have a link <a
> href="/myProject/myServlet">Execute</a>.)
>
> OK, I set this up and get it working ok on the internal web browser,
> shut everything down, go home, come back next day and try to run it
> again. Typically (but not invariably) I get a 404 with the url
> http://localhost:8080/myProject/start.html in the url entry field. Same
> result copying and pasting into an external browser. Try
> http://localhost:8080/myProject/ and nothing is listed.
>
> At this stage I start kicking tyres and banging the engine: Rebuilding,
> cleaning, removing the project from the virtual server (this seems
> necessary but I'm not sure it's sufficient) and eventually
> http://localhost:8080/myProject/ will list my start.html file. Click on
> it and I get a 404 again (cache) but a reload clears and all is well.
>
> This is time-wasting and infuriating as I don't know which kick does the
> trick. Yesterday I got it on four consecutive servlets I'd previously
> set up to demonstrate. Today the first one I checked was OK, but the
> second showed this behaviour. It cleared after I removed the project
> from the virtual server.
>
> Anyone seen this before or can suggest a solution?
> David
>
Maybe a good first step would be to find out what is actually going to
and from the server. One way you can do this is to right-click on the
server in the Servers view and select Monitoring -> Monitor port 8080.
The next request to the server should open the TCP/IP Monitor view and
show the content of the request and the response. Be sure to use Run As
-> Run on Server to send the initial request. The URL will contain the
"monitoring" port being used to proxy the request to the server. For
Tomcat, you can also see the request and response data by uncommenting
the RequestDumperValve in server.xml found under the Servers project in
your workspace. The request and response data should appear in the
Console log. See if the expected requests are actually reaching the server.
Cheers,
Larry
|
|
|
Re: 404 error bug in Internal Web Browser [message #218218 is a reply to message #218131] |
Fri, 25 July 2008 14:59 |
Eclipse User |
|
|
|
Originally posted by: d.leader.bio.gla.ac.uk
Larry Isaacs wrote:
> Maybe a good first step would be to find out what is actually going to
> and from the server. One way you can do this is to right-click on the
> server in the Servers view and select Monitoring -> Monitor port 8080.
> The next request to the server should open the TCP/IP Monitor view and
> show the content of the request and the response. Be sure to use Run As
> -> Run on Server to send the initial request. The URL will contain the
> "monitoring" port being used to proxy the request to the server. For
> Tomcat, you can also see the request and response data by uncommenting
> the RequestDumperValve in server.xml found under the Servers project in
> your workspace. The request and response data should appear in the
> Console log. See if the expected requests are actually reaching the server.
Thanks. OK I followed all this and it seems that the request was
transmitted:
Request localhost:12596
Size: 0 (418) bytes
Header: GET /Greeting/HelloWorld.html HTTP/1.1
Response localhost:8080
Size: 740 (995) bytes
Header: HTTP/1.1 404 /Greeting/HelloWorld.html
Nothing on console except server startup.
Then I stopped the server, removed the project from it, reran
HelloWorld.html as Run on Server again and this time ok. Strangely nothing
on TCP/IP Monitor even though Monitoring still selected.
David
|
|
|
|
Re: 404 error bug in Internal Web Browser [message #218254 is a reply to message #218226] |
Fri, 25 July 2008 21:11 |
Eclipse User |
|
|
|
Originally posted by: d.leader.bio.gla.ac.uk
Thanks Larry,
I guess this is just something to work round.
On a more positive note, I appreciate being able to run the servlets on
Eclipse. Although it's not the way I've been operating myself, our
Bioinformatics Masters students learn Java on it, so when they come to the
project part of their course it's helpful that they are able continue
using it. (The beauty of the Mac platform is that you can mimic a Solaris
or Linux installation with Tomcat running locally and your servlet
accessing local MySQL databases. Just avoid java 1.6.)
David
|
|
|
Re: 404 error bug in Internal Web Browser [message #218262 is a reply to message #218226] |
Fri, 25 July 2008 21:11 |
Eclipse User |
|
|
|
Originally posted by: d.leader.bio.gla.ac.uk
Thanks Larry,
I guess this is just something to work round.
On a more positive note, I appreciate being able to run the servlets on
Eclipse. Although it's not the way I've been operating myself, our
Bioinformatics Masters students learn Java on Eclipse, so when they come
to the project part of their course it's helpful that they are able
continue using it. (The beauty of the Mac platform is that you can mimic a
Solaris or Linux installation with Tomcat running locally and your servlet
accessing local MySQL databases. Just avoid java 1.6.)
David
|
|
|
Powered by
FUDForum. Page generated in 0.06928 seconds