- This topic has 6 replies, 4 voices, and was last updated 20 years ago by Riyad Kalla.
-
AuthorPosts
-
markshifmanMemberI am a newbie to myeclipse and am having problems deployiing a web app that contains context.xml in META-INF. When I use the “exploded” deployment, the context.xml doesn’t get copied to Tomcat5.0\conf\Catalina\localhost. When I use the packaged deploy it does get there however the tomcat manager says requested resource is not available.
I looked in your archive but I must have missed something major.
any help appreciated.
mas
Riyad KallaMembermas,
The deployment tool in MyEclipse does a direct deployment to your server. After that, it is up the server to handle those resources correctly. In your case Tomcat is not deploying the /context.xml file correctly, as an side I have NEVER gotten the deployment of the context file working with Tomcat, so I’m not entirely surprised this isn’t working for you. MyEclipse doesn’t control this portion of the deployment step, so there isn’t any help I can provide in this area. Luckily this file only needs to be deployed once to the conf/Catalina/localhost directory so you don’t need to do it each time.
RobMemberWhenever you deploy a file, Tomcat will auto-generate a context.xml. If you had compared the one in the Catalina/localhost dir with your custom one, they were probably not the same.
Tomcat will blow away any your context.xml file from the Catalina/localhost dir if you use the Ant deploy targets, or if you deploy through the Tomcat Console.
You can include your context.xml file in your war file’s META-INF directory, and Tomcat should find and use it without an issue (according to Tomcat Documentation).
Good Luck,
Rob.
fermataintlMemberI’m having the same problem. I am migrating a project I built using vi and ant into [my]eclipse. I used the ant deploy stuff and it worked just fine (with a context.xml file). I’ve gotten to the point where context.xml ends up in webapps/ROOT/META-INF but tomcat is apparently not recognizing it, since I’m getting a name not found exception regarding jdbc, which is defined in context.xml.
Has anyone gotten anywhere with this?
Thanks.
Dean
Riyad KallaMemberIf you are deploying the ROOT app, I don’t know if it’s context file is handled differently, you might check the Tomcat listserve.
fermataintlMemberOK. I poked around the internet and got some information from a person who researched this further. Apparently, when you use ant to deploy to tomcat a copy of the context.xml file is dropped in $TOMCAT_HOME/conf/Catalina/localhost/<your_app>.xml
This is the way I’ve been working up until now, just using vi and ant to build my application and it all worked very nicely.In the case of the root app (/), the file will be called ROOT.xml. So this is what I have to do to get it to work in [my]eclipse:
1) copy the context.xml file into the above mentioned directory as ROOT.xml
2) restart tomcat (I don’t know if this is required)
Then it just works. I don’t know if you guys at MyEclipse can make this deployment less painful, but I’d love to see it happen. On a related note I would like to see the starting and stopping of the server happen in single click mode. And, it would be nice if there was a restart operation in addition to just start and stop.
Cheers,
Dean
Riyad KallaMemberDean,
These are all ideas we have filed, part of the reason the app server controls seem a bit lame is that they are a) our original implementation from early ME days and b) we have queued up a major overhaul of the whole app server launch structure, but we need to find a good time to rip out everything and replace it… hardly a small task so we need to plan it well. In the mean time any enhancements to the current less-than-great system are not that high on our priority list because of what is in our queue… it would be a lot of wasted work. That being said, if we push the enhancemnt out too long, we will throw in some of the smaller ones to tide us over. -
AuthorPosts