*
The moose likes Beginning Java and the fly likes Error regarding Import servlet package Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Error regarding Import servlet package" Watch "Error regarding Import servlet package" New topic
Author

Error regarding Import servlet package

chintan ramavat
Ranch Hand

Joined: Sep 15, 2006
Posts: 134
Hello friends,

i am trying to run one Servlet using JDK1.5 , actually not trying run exactly but trying to have .class file once I have .java compiled. but it giving me errors while i attempt to compile using following statements.

import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;

it would be really great if somebody can give any suggestion either on JDK version problem or anything else..

- Thank you
- CHI :roll:
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9343
    
111

Does this help?


[My Blog] [JavaRanch Journal]
Herman Schelti
Ranch Hand

Joined: Jul 17, 2006
Posts: 387
hi,

To compile a servlet you need Java's Enterprise Edition (J2EE 1.4 or JEE5) as well.
Which IDE or webserver do you use?
(they usually already have what you need).

Herman
chintan ramavat
Ranch Hand

Joined: Sep 15, 2006
Posts: 134
Thank you Jaikiran and Herman for an instant reply, I really appreciate.
In fact I had a problem with setting up CLASSPATH and finding packages around.
I got the code working now.

It was bit easy using Sun App but I am using TOMCAT5.5 so had to locate different packages. anyway again thank you very much for a quick reply. just minutes before i got it working so now.

- regards,
- CHI
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Moving to Java In General (Beginner) where all javac and classpath discussions are held.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error regarding Import servlet package
 
Similar Threads
is imported servlet initialized too??
Servlets and Textpad
Textpad and Servlets
package javax.servlet does not exist.
Servlet problem