Unable to run servlet on tomcat7 from eclipse luna (ubuntu 14.04) [message #1693598] |
Sun, 26 April 2015 05:44  |
Eclipse User |
|
|
|
Hi,
I'm running into some (I guess) configuration problem preventing me from running a java servlet on an otherwise working tomcat7 under ubuntu 14.04.
I'm attempting to develop a servlet as described at www.srccodes.com/p/article/3/Tomcat-Hello-World-Servlet-using-Eclipse-IDE
These are the steps I've undertaken so far:
installed tomcat7 + examples and ocumentation (http://127.0.0.1:8080 confirms this worked)
installed eclipse luna (jee package) throught the following steps:
Quote:
downloaded the tar.gz
cd /opt/ && sudo tar -zxvf ~/Downloads/eclipse-jee-luna-SR2-linux-gtk-x86_64.tar.gz
create a new dynamic web project as described in the tutorial link.
In order to get past the first problem, I performed the following:
Quote:
rm workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jst.server.tomcat.core.prefs
rm workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.wst.server.core.prefs
Still no luck, so performed the following:
Quote:
cd /usr/share/tomcat7
sudo ln -s /var/lib/tomcat7/conf conf
sudo ln -s /etc/tomcat7/policy.d/03catalina.policy conf/catalina.policy
sudo ln -s /var/log/tomcat7 log
sudo chmod -R 0777 /usr/share/tomcat7/conf
This got me a bit further but led to an error I solved by adding /usr/share/tomcat7/lib/servlet.api.jar to the project's java build path
I've also added the Tomcat7 server to my project. When I now try to run the servlet on a server I get the error (basically the error I had at the very start)
Quote:
Could not load the Tomcat server configuration at /Servers/Tomcat v7.0 Server at localhost-config. The configuration may be corrupt or incomplete.
An alleged solution for that problem is to copy the contents of /usr/share/tomcat7/conf to workspace/Servers/Tomcat\ v7.0\ Server but that didn't solve anything in my case.
Does anybody know how I can get this to work? For info I've included a screenshot of my project structure
|
|
|
|
Re: Unable to run servlet on tomcat7 from eclipse luna (ubuntu 14.04) [message #1693609 is a reply to message #1693598] |
Sun, 26 April 2015 13:01  |
Eclipse User |
|
|
|
You've gone to a great deal of work. You're right, it should not be that
hard, but I fear you're stabbing around desperately trying to solve it.
I say this because you should not be surgically deleting anything out of
..metadata which is for Eclipse to manage. You should not have to muck
with the Server in your workspace either.
I can't help with what you've done already and I don't know the tutorial
itself. I would suggest you consider some of the ideas exposed on this
page of notes:
http://www.javahotchocolate.com/notes/eclipse-jdk-tomcat.html
If you wish to contact me directly with questions, because I'm not
timely in the forum when you have questions, feel free. Also, your
questions really fall more under what's supported in the Eclipse WTP
forum rather than the newcomers' forum.
Cheers
|
|
|
Powered by
FUDForum. Page generated in 0.21116 seconds