0

I have the basic (how do I check exactly what I have?) Eclipse version 3.3.

I am trying to get it to remove the squiggly red error lined from my import statements that try to import the servlet libraries like this:

import javax.servlet.http.HttpServlet;

What is the best way to do that? I think it is just not configured to know where the Tomcat libs are.

I tried to follow this example: How do I import the javax.servlet API in my Eclipse project? but I think my version of Eclipse is pretty different than the example assumes. I couldn't find the servers view to tell it to use Tomcat.

I use Ubuntu.

Community
  • 1
  • 1
Genadinik
  • 18,153
  • 63
  • 185
  • 284

2 Answers2

3

You can install the WTP separately via Eclipse update tool by Help > Install new Software > Set URL to http://download.eclipse.org/releases/helios.

However, I'd warmly recommend to just throw away your non-EE version and download the real Eclipse for Java EE version. I've read here and there that upgrading it by the update tool doesn't always yield the desired results.

If your major concern is the loss of preferences/settings, then it's good to know that you can just export/import them by File > Export/Import > General > Preferences. Also any existing projects can be re-imported without issues.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
0

You need to have the servlet-api.jar on your build path to remove those errors. But don't just include it inside WEB-INF/lib as it'll conflict with your tomcat when it's deployed as a webapp.

asgs
  • 3,928
  • 6
  • 39
  • 54