aspose file tools*
The moose likes Beginning Java and the fly likes Errors in compiliation. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Errors in compiliation." Watch "Errors in compiliation." New topic
Author

Errors in compiliation.

Yuta Lolap
Ranch Hand

Joined: Jun 03, 2012
Posts: 83

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

Joined: Jan 10, 2002
Posts: 61198
    
  66

Moved to beginning Java where compilation issues are discussed.

Is the servelet-api.jar in the build classpath?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Yuta Lolap
Ranch Hand

Joined: Jun 03, 2012
Posts: 83

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

Joined: Jun 03, 2012
Posts: 83

Hw to incude the servlet api? And thanjs for moving me to the right section.
William P O'Sullivan
Ranch Hand

Joined: Mar 28, 2012
Posts: 859

javax.servlet is provided usually by the container; Tomcat,JBoss,WebSphere etc.

WP
Jeff Verdegan
Bartender

Joined: Jan 03, 2004
Posts: 6109
    
    6

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

Joined: May 29, 2009
Posts: 246
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
 
subject: Errors in compiliation.