• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Help me out very simple basic problem in servlets

 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hay i am having eclipse platform version 3.3.0
i am beginner in java, just started servlets
But the problem is i cant import javax.servlets.*;
i cant find javax.servlets on my eclipse , do i have to install more
for servlets, please help me out !
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The servlet API is not part of Java SE. You need to add a JAR file to the classpath. See Compiling Servlets in the JavaRanch FAQ.

In Eclipse, you add a JAR to your project by right-clicking on the project, selecting Properties, then go to Java Build Path, Libraries. Click Add External JARs; lookup the JAR with the servlet API and add it.
 
Ranch Hand
Posts: 629
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Just in case you are wondering what jar file to include, Download JSWDK(Java Sever Web Development Kit) from Sun's website and you will find servlet.jar in it.

Thanks.
 
Ranch Hand
Posts: 445
Android Eclipse IDE Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Copy servlet-api.jar or servlet.jar and paste it to the $TOMCAT/lib/ folder and then try to compile the servlet file..
[ July 10, 2008: Message edited by: Rajkumar balakrishnan ]
 
Matt Swaggi
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank You . Its Working !
reply
    Bookmark Topic Watch Topic
  • New Topic