views:

231

answers:

1

Hi,

I've been working on a dynamic web project in Eclipse. I have recently reInstalled my OS and I use a clean eclipse. I can import my web project, but when I try to lunch (run on server) I always get this message:

"The selection cannot be run on any server"

I installed the eclipse's tomcat plugin, and it works fine. I set the tomcat library too. (window/preferences/tomcat).

What's the problem with it?

A: 

If I understand you correctly you have imported a previously working web project into a clean install of Eclipse (and OS) and you are tying to run the project on Tomcat. There could be a number of reasons why it isn't working, here are some things to consider in troubleshooting:

  1. First thing to validate is whether or not Tomcat has been installed correctly and is running without errors. You say you installed a Tomcat plugin for Eclipse. I didn't know there was one. I usually install Tomcat separately and then configure Tomcat settings in Eclipse. Or did you install Tomcat via the Servers view? Windows -> View -> Other -> Server -> Servers, right click in Server view and go New -> Server. Select Apache and then Tomcat?
  2. Can you start and stop Tomcat within Eclipse? If so can you open a browser and navigate to http://localhost:8080 - a Tomcat console should display. Check the logs there shouldn't be any errors.
  3. You should be able to right click on your web project and say run on server and select Tomcat. Alternatively in the Server view right click on the Tomcat server and select Add and Remove.
  4. If the 3rd step didn't work it is possible that the imported project has errors. Could be referencing Libraries that don't exist or paths that are invalid. Open the problems view and see if there are any compile errors. Open the errors view and see if there are any eclipse errors. Right click the project -> Build path -> Configure build path. Examine the reference libraries and see if there are any errors or warnings.
  5. If you the above all works and you have still not made any progress try creating a simple dynamic web application from scratch and run that on the server.
Ross