- Tomcat 6 / Eclipse Galileo 3.5 / Ubuntu 10
- Installed tomcat6-user (so that I've got user instance/control rather than a general ubuntu service).
- Tomcat 'runtime' installed to '/usr/share/tomcat6'
- Created local Tomcat instance in '~/tomcat/my-instance' using 'tomcat6-instance-create my-instance'; as per 'https://help.ubuntu.com/10.04/serverguide/C/tomcat.html'
- Some Tomcat config in '/etc/tomcat6'
Problem:
- Eclipse doesn't recognise Tomcat 6 server adapter and won't create an instance of this server.
Mission:
- To get Eclipse to recognise Tomcat 6 server adapter
- To create an instance of this server for use by Dynamic Web Projects.
What worked:
- Instead of 1 & 2 below, tried linking to the bin and lib directories in /usr/share/tomcat6 from my local app instance (~/tomcat/my-instance/conf) (i.e. cd ~/tomcat/my-instance; ln -s /usr/share/tomcat6/bin bin). Then 'sudo chmod -R +rx /usr/share/tomcat6'. Pointing the Eclipse server adapter at '~/tomcat/my-instance' now recognises this as a valid adapter. Mission #1 accomplished. However still doesn't let me create a server instance. Hmm.
- Checked the Error Log, which said "Could not load the Tomcat server configuration at ~/tomcat/my-instance/conf", which was caused by a FileNotFoundException on "conf/catalina.policy". Ah-ha! 'cd conf; touch catalina.policy'. Bingo! All good. Mission #2 accomplished.
- TODO - Got an empty security policy, will need locking down in production.
What else I tried:
- As per stackoverflow, tried linking to my local app instance (~/tomcat/my-instance/conf) from the tomcat runtime (/usr/share/tomcat6) but didn't help much. Undo.
- Looked at eclipse wiki and eclipse forums but my Tomcat install had 'lib/servlet-api.jar' so those didn't seem relevant.
No comments:
Post a Comment