File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Errors in compiliation.

 
Yuta Lolap
Ranch Hand
Posts: 86
Eclipse IDE Java jQuery
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I created a fully functional servlet that works and then i send it to a friend he opened it in Eclipse Juno Enterprise Edition and then he get an error saying Imports Cannot Be Resolved. He has JDK7 installed JRE7 and Apache Tomcat. Wat is the issue here? Its saying that there is no class for HTTPServlet also.

The import javax.servlet cannot be resolved
The import javax.servlet cannot be resolved

Why is he getting this error?

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64196
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved to beginning Java where compilation issues are discussed.

Is the servelet-api.jar in the build classpath?
 
Yuta Lolap
Ranch Hand
Posts: 86
Eclipse IDE Java jQuery
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do i chek the class path?


Rightick the project->build path->configure build path and then i get to see all the jre7 and webapp libs. Thi is wat i can see in eclipse. I there something missing here?
 
Yuta Lolap
Ranch Hand
Posts: 86
Eclipse IDE Java jQuery
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hw to incude the servlet api? And thanjs for moving me to the right section.
 
William P O'Sullivan
Ranch Hand
Posts: 859
Chrome IBM DB2 Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
javax.servlet is provided usually by the container; Tomcat,JBoss,WebSphere etc.

WP
 
Jeff Verdegan
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
William P O'Sullivan wrote:javax.servlet is provided usually by the container; Tomcat,JBoss,WebSphere etc.

WP


While those products may provide the Servlet classes, that doesn't help here since the problem is a compilation error (as indicated in the subject line and first post).
 
sai rama krishna
Ranch Hand
Posts: 411
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Download/get servelet-api.jar and put it some specific location

Rightick the project->build path->configure build path then import the jar to resolve those

The import javax.servlet cannot be resolved

related errors
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic