File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Mac OS and the fly likes Tomcat, Eclipse, and server.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Mac OS
Bookmark "Tomcat, Eclipse, and server.xml" Watch "Tomcat, Eclipse, and server.xml" New topic

Tomcat, Eclipse, and server.xml

Garann Means
Ranch Hand

Joined: Jan 28, 2002
Posts: 214
I can't seem to get the path to my application right in its server.xml type file. I have Tomcat in one Eclipse project and the code I want to debug in another. The file currently looks like this:

When I go to localhost:8080/ethos, it tells me the requested resource is not available. Can anyone suggest what I might be doing wrong?


Added: Oh, and I post this in here because this is in Mac OSX and it works fine on my Windows PC at work.
[ October 19, 2005: Message edited by: Garann Means ]
marc weber

Joined: Aug 31, 2004
Posts: 11343

A guess: Should you be using forward slashes (rather than backslashes) on the Mac?

"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
Garann Means
Ranch Hand

Joined: Jan 28, 2002
Posts: 214
Thanks for the suggestion, but I'm afraid that didn't do it.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63868

Does it work if you run Tomcat outside of Eclipse? I've never had issues.

[Asking smart questions] [About Bear] [Books by Bear]
Garann Means
Ranch Hand

Joined: Jan 28, 2002
Posts: 214
That's a good question. I don't really know how to run an Eclipse project in Tomcat without going through Eclipse. I'll see if I can figure it out... Thanks for the suggestion!
Mahsa Teimourikia

Joined: Apr 11, 2013
Posts: 1
I had the same problem, however the solution was very easy. I had to Clean Tomcat server in eclipse before restarting it. To be more clear, here is how I set the context in Eclipse,

In the Servers in project explorer, find the Tomcat version you are using, open the server.xml file. Before the HOST closing tag (</Host>) add the context tag with the right parameters, e.g:

then right click on your Tomcat in the Server tab and Clean. Then restart the Tomcat. and you should be good to go.
I agree. Here's the link:
subject: Tomcat, Eclipse, and server.xml
It's not a secret anymore!