Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Eclipce (3.5) + Tomcat 6 = frustration..
icon8.gif  Eclipce (3.5) + Tomcat 6 = frustration.. [message #768606] Tue, 20 December 2011 08:01 Go to next message
Roland Bertolom is currently offline Roland Bertolom
Messages: 1
Registered: December 2011
Junior Member
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... =(
Re: Eclipce (3.5) + Tomcat 6 = frustration.. [message #768640 is a reply to message #768606] Tue, 20 December 2011 09:15 Go to previous message
Larry Isaacs is currently offline Larry Isaacs
Messages: 1298
Registered: July 2009
Senior Member
The WTP Tomcat support works the way it does for various reasons, which
doesn't appear to match your expectations. See if the Tomcat FAQ[1] helps.

Cheers,
Larry

[1] http://wiki.eclipse.org/WTP_Tomcat_FAQ

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... =(
Previous Topic:access include path from inferrence provider?
Next Topic:unable to run the project on webserver
Goto Forum:
  


Current Time: Fri Jul 25 21:18:39 EDT 2014

Powered by FUDForum. Page generated in 0.02069 seconds