Eclipce (3.5) + Tomcat 6 = frustration.. https://www.eclipse.org/forums/index.php/mv/msg/268388/768606/#msg_768606
My troubles starts as I've tried to create new project. I've wanted to create it with the same structure as my old created with notepad project had and in the same place where it was located (/var/www). My projects structure was a Standard Directory Layout recommended by Apache Tomcat manual i.e.

But Eclipse create its own layout even if I set project content dir '/var/www/MyApp' and default output folder 'WEB-INF/Classes'. I can't set 'content directory' the same as 'Context root'. As a result dir layout will looks like

And the only way to force Eclipse use MyApp/WEB-INF/Web.xml is to copy it from MyApp/WebContent/WEB-INF/Web.xml and than delete MyApp/WebContent/ manually.. Sadness.
That's ok, let's move forward.
When I've try to run my app on server, I've get the errors like "Could not load the Tomcat server configuration at /Servers/Tomcat v6.0 Server at localhost-config. The configuration may be corrupt or incomplete." Creating simlinks for files server.xml, catalina.policy, tomcat-users.xml, catalina.properties and web.xml to gather its all in /etc/tomcat6 and chmod permissions to 777 fixes that.
But when I try to Run on Server my app, Tomcat of course cant find id and I get error 404 "The requested resource (/MyApp) is not available." And I can't change docBase to /var/www/MyApp neither via Eclipse's graphical nor manually in Server.xml (if I do this I get the error "Could not load the Tomcat server configuration.." back). The only way I've found is to create simlink to /var/www/MyApp in $WORCSPACE/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps [really nice path to find!]
Now I get the next error "Could not publish server configuration: Resource is out of sync with the file system: '/Servers/Tomcat v6.0 Server at localhost-config/server.xml'..". And can't to google any ideas about it. It occurs every time I'm saving my servlet.
Something is wrong... Frustration... =(]]>Roland Bertolom2011-12-20T13:01:43-00:00Re: Eclipce (3.5) + Tomcat 6 = frustration..https://www.eclipse.org/forums/index.php/mv/msg/268388/768640/#msg_768640
doesn't appear to match your expectations. See if the Tomcat FAQ[1] helps.

On 12/20/2011 8:01 AM, Roland Bertolom wrote:
> Hello! It seems that I have total misunderstanding about how to work
> with Eclipse 3.5 + WTP 3.1 + Tomcat 6, because every my step faces
> troubles, bugs etc. although working with another components of Eclipse
> as well as Tomcat + notepad goes good.
> My troubles starts as I've tried to create new project. I've wanted to
> create it with the same structure as my old created with notepad project
> had and in the same place where it was located (/var/www). My projects
> structure was a Standard Directory Layout recommended by Apache Tomcat
> manual i.e.
>
> /var/www/MyApp
> /var/www/MyApp/WEB-INF
> /var/www/MyApp/WEB-INF/Web.xml
> /var/www/MyApp/WEB-INF/Classes
>
> But Eclipse create its own layout even if I set project content dir
> '/var/www/MyApp' and default output folder 'WEB-INF/Classes'. I can't
> set 'content directory' the same as 'Context root'. As a result dir
> layout will looks like /var/www/MyApp
> /var/www/MyApp/src - that's good!
> /var/www/MyApp/WEB-INF
> /var/www/MyApp/WEB-INF/Classes
> /var/www/MyApp/WebContent/WEB-INF/Web.xml - or it may be
> /var/www/MyApp/MyApp/WEB-INF/Web.xml
> And the only way to force Eclipse use MyApp/WEB-INF/Web.xml is to copy
> it from MyApp/WebContent/WEB-INF/Web.xml and than delete
> MyApp/WebContent/ manually.. Sadness.
> That's ok, let's move forward.
> When I've try to run my app on server, I've get the errors like "Could
> not load the Tomcat server configuration at /Servers/Tomcat v6.0 Server
> at localhost-config. The configuration may be corrupt or incomplete."
> Creating simlinks for files server.xml, catalina.policy,
> tomcat-users.xml, catalina.properties and web.xml to gather its all in
> /etc/tomcat6 and chmod permissions to 777 fixes that. But when I try to
> Run on Server my app, Tomcat of course cant find id and I get error 404
> "The requested resource (/MyApp) is not available." And I can't change
> docBase to /var/www/MyApp neither via Eclipse's graphical nor manually
> in Server.xml (if I do this I get the error "Could not load the Tomcat
> server configuration.." back). The only way I've found is to create
> simlink to /var/www/MyApp in
> $WORCSPACE/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps [really
> nice path to find!]
> Now I get the next error "Could not publish server configuration:
> Resource is out of sync with the file system: '/Servers/Tomcat v6.0
> Server at localhost-config/server.xml'..". And can't to google any ideas
> about it. It occurs every time I'm saving my servlet.
> Something is wrong... Frustration... =(]]>Larry Isaacs2011-12-20T14:15:30-00:00