Home » Language IDEs » ServerTools (WTP) » Tomcat 404 Resource not found(Tomcat and Eclipse)
| |
Re: Tomcat 404 Resource not found [message #503069 is a reply to message #502857] |
Thu, 10 December 2009 18:40 |
designing woman Messages: 10 Registered: December 2009 |
Junior Member |
|
|
Larry,
Thank you for the response. I was hoping I would hear from you as I have seen many of your insightful posts.
I fixed it. The root cause was XML related. And since ZK and Eclipse have done ALL my xml file updates, one of them caused the problem, IMHO.
However, the debugging was made very difficult, because the 404 is a generic error. It masks the real problem. I did not have the admin or manager part of tomcat installed, because it is no longer loaded by default. THAT is ridiculous - and just causes more work.
I noticed the following:
1) Eclipse does not allow me to change the server location and "take control". These options were gray. The link to launch configuration and VM arguments screen are there, but did not seem to actually update the variables.
2) The way Eclipse worked with the install of Tomcat did not allow manager access i.e. http://localhost:8080/manager
It should. I had to fix that manually.
3. The xml files that are used in Eclipse, Tomcat, and ZK are highly problematic. There are a lot of variables that are set, and it is confusing who is setting what. Some documentation of what is "normal" would be useful.
4. I am not sure whether ZK or Eclipse caused the XML problem. I just know I didn't.
My solution from now on is to use a small project for testing. Then I will gradually migrate what works to a tested project. That way, if one file causes a problem in one project, it won't destroy the larger work.
|
|
|
Re: Tomcat 404 Resource not found [message #503083 is a reply to message #503069] |
Thu, 10 December 2009 14:46 |
Larry Isaacs Messages: 1354 Registered: July 2009 |
Senior Member |
|
|
designing woman wrote:
> Larry,
>
> Thank you for the response. I was hoping I would hear from you as I have
> seen many of your insightful posts.
> I fixed it. The root cause was XML related. And since ZK and Eclipse
> have done ALL my xml file updates, one of them caused the problem, IMHO.
> However, the debugging was made very difficult, because the 404 is a
> generic error. It masks the real problem.
I know the Tomcat philosophy is that error details should appear in a
log and not disclosed to the client for security reasons. I don't know
if clues should have appeared in the Console view.
> I did not have the admin or
> manager part of tomcat installed, because it is no longer loaded by
> default. THAT is ridiculous - and just causes more work.
> I noticed the following: 1) Eclipse does not allow me to change the
> server location and "take control". These options were gray.
Switching the location with added projects wasn't practical to support.
This is what the text immediately under the "Server Locations" section
is trying to say. You have to remove all projects from the server,
publish the server so the projects are actually removed, then the
ability to change the location will be enabled. After changing the
location, re-add the projects.
> The link
> to launch configuration and VM arguments screen are there, but did not
> seem to actually update the variables.
You can add VM arguments, but the ones there by default are "owned" by
the WTP Tomcat support and get regenerated from the server configuration
on each launch.
> 2) The way Eclipse worked with the install of Tomcat did not allow
> manager access i.e. http://localhost:8080/manager It should. I had to
> fix that manually.
I assume switching the location would address this issue.
>
> 3. The xml files that are used in Eclipse, Tomcat, and ZK are highly
> problematic. There are a lot of variables that are set, and it is
> confusing who is setting what. Some documentation of what is "normal"
> would be useful.
What we have for WTP is in the Tomcat FAQ. I'm not at all familiar with
ZK to say how that impacts things.
>
> 4. I am not sure whether ZK or Eclipse caused the XML problem. I just
> know I didn't.
> My solution from now on is to use a small project for testing. Then I
> will gradually migrate what works to a tested project. That way, if one
> file causes a problem in one project, it won't destroy the larger work.
>
I would hope some improved logging would provide better information when
a problem occurs. However, there are number of ways to add logging to
Tomcat, i.e. one log for all of Tomcat, independent logging per content,
etc. Because of the complexity of addressing this across the various
Tomcat versions, there isn't any special logging configuration provided
by default. The benefit of this is that any logging you may have
enabled in your webapp won't be interfered with. As far as what might
help, it's hard to speculate beyond this without knowing more about the
nature of the problem.
Cheers,
Larry
|
|
| | |
Re: Tomcat 404 Resource not found [message #654306 is a reply to message #654251] |
Tue, 15 February 2011 02:04 |
yoichi takayama Messages: 3 Registered: February 2011 |
Junior Member |
|
|
That answers the question superbly by explaining that it is because Eclipse makes another copy of Tomcat by using the CATALINA_BASE mechanism and runs it. The concept is very familiar with Tomcat regular users. Although in this copy, ROOT, manager, etc. are all disabled.
It also answers how to change this behaviour to rather use the copy at the CATALINA_HOME, if it is desired.
However, more often than not, we need to change server.xml, etc. and the location of this CATALINA_BASE is important, since it was critical to realise to modify these in the CATALINA_BASE, not CATALINA_HOME.
Some other article showed me that this information can be found as follows:
1. Go to Java Perspective
2. Go to services View
3. Double-click the Tomcat instance
4. Click on Open launch configuration
5. Select Arguments tab
6. VM arguments column shows -Dcatalina.base="...."
That is the value of the CATALINA_BASE.
Thanks,
Yoichi
|
|
|
Re: Tomcat 404 Resource not found [message #654389 is a reply to message #654306] |
Tue, 15 February 2011 14:08 |
Larry Isaacs Messages: 1354 Registered: July 2009 |
Senior Member |
|
|
On 2/14/2011 9:04 PM, yoichi takayama wrote:
> That answers the question superbly by explaining that it is because
> Eclipse makes another copy of Tomcat by using the CATALINA_BASE
> mechanism and runs it. The concept is very familiar with Tomcat regular
> users. Although in this copy, ROOT, manager, etc. are all disabled.
>
> It also answers how to change this behaviour to rather use the copy at
> the CATALINA_HOME, if it is desired.
>
> However, more often than not, we need to change server.xml, etc. and the
> location of this CATALINA_BASE is important, since it was critical to
> realise to modify these in the CATALINA_BASE, not CATALINA_HOME.
>
> Some other article showed me that this information can be found as follows:
>
> 1. Go to Java Perspective
> 2. Go to services View
> 3. Double-click the Tomcat instance
> 4. Click on Open launch configuration
> 5. Select Arguments tab
> 6. VM arguments column shows -Dcatalina.base="...."
>
> That is the value of the CATALINA_BASE.
>
> Thanks,
> Yoichi
If you are going to change server.xml, it's the one under the Servers
project in your workspace you would want to change if you want the
change to persist. That one is the "master" copy. The one under
CATALINA_BASE will get overwritten whenever the Tomcat server is published.
Cheers,
Larry
|
|
| |
Goto Forum:
Current Time: Tue Sep 24 18:44:15 GMT 2024
Powered by FUDForum. Page generated in 0.04386 seconds
|