jQuery in Action, 3rd edition
The moose likes IDEs, Version Control and other tools and the fly likes Servlet cannot be resolved. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Servlet cannot be resolved." Watch "Servlet cannot be resolved." New topic

Servlet cannot be resolved.


Joined: Apr 04, 2006
Posts: 4
Hi I am having a problem with Eclipse. When I try to code servlets and I import javax.servlet Eclipse says that it cannot be resolved. How can I get right. Thanks in advance.
Lasse Koskela

Joined: Jan 23, 2002
Posts: 11962
You need to add a JAR file (one that contains javax.servlet.* stuff) to your project's classpath.

Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 32822

This would be the j2ee.jar or servlets.jar that comes with your application/web server.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
I agree. Here's the link: http://aspose.com/file-tools
subject: Servlet cannot be resolved.
It's not a secret anymore!