• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error regarding Import servlet package

 
chintan ramavat
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does this help?
 
Herman Schelti
Ranch Hand
Posts: 387
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to Java In General (Beginner) where all javac and classpath discussions are held.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic