posted 18 years ago
Ah, I should have mentioned this before...
For the context.xml to be properly deployed from META-INF to the Tomcat conf directory, (which also includes renaming the context.xml to <Your Context Name>.xml) the context must be deployed through Tomcat manager, as a .war file (Web Application Archive)
If you want to deploy it yourself by copying the files to the webapps directory, you'll need to do it this way:
- stop Tomcat
- copy your context to CATALINA_HOME/webapps
- copy your context.xml to CATALINA_HOME/conf/Localhost(?)
- I'm not at my development computer at the moment, I forget the full path to the directory, just go to conf and drill down until you see .xml files
- rename your context.xml to <Your Context Name>.xml (this must match what's defined in the context.xml)
- restart Tomcat
Once you've deployed it the first time, you won't need to copy the context.xml every time, only when you've made changes to it.
If you're interested in using a war to deploy, simply zip your context directory, rename it to <Your Context Name>.war then use Tomcat manager to deploy it.