3

I am kinda a noob when it comes to interacting with servers. I have been using Eclipse for some time, but only now have I needed to utilize the javax.servlet.* classes. However, when I try to import these into the current class I am working with I get "The import javax.servlet cannot be resolved." I have tried following solutions found on other questions, but they don't seem to work for me. Any help would be much appreciated.

I have looked into the directory where my classes are.. I have javax.(stuff) but not javax.servlet.

Thank you!

Phil
  • 33
  • 2
  • 4

3 Answers3

2

You should get the Eclipse Web Development Tool plugin for your eclipse. check out here http://www.eclipse.org/webtools/development/ or go to

Help->Software updates->available softwares select web development tools

GuruKulki
  • 25,118
  • 47
  • 138
  • 197
2

Find where java-serlvet.api is and append it to your build classpath. For example, in Tomcat 6, it's in TOMCAT_DIR\lib, in Jetty 6 it's in JETTY_DIR\lib too.

Victor Sorokin
  • 11,695
  • 1
  • 33
  • 49
1

you can add the web tools platform for Eclipse. Download it from here.

Aleadam
  • 39,843
  • 9
  • 85
  • 108