javax.servlet import cannot be resolved after moving web servlet
- by Michael Kjörling
I have written a small web servlet to run under Tomcat, using Eclipse Helios. In its old, non-source-controlled location, everything was fine, but now I need to add this to our source control system. Moving the old files out of the way, creating a new workspace, setting up the server connection and copying and importing the existing projects into the new workspace all worked fine once I figured out how to do it, but I can't get the servlet to build. Instead, I get a whole bunch of cannot be resolved to a type errors talking about various servlet class types; HttpServlet, HttpServletRequest, ServletException, etc. Another error that is almost certainly related is The import javax.servlet cannot be resolved.
I am obviously missing something very basic, but I'm new to this (and not having the terminology really down pat probably doesn't help me Google for an answer). Any suggestions as to what I might be missing would be greatly appreciated.