This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes Servlets and the fly likes ONE of the FAQs reg. HttpServlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "ONE of the FAQs reg. HttpServlet" Watch "ONE of the FAQs reg. HttpServlet" New topic

ONE of the FAQs reg. HttpServlet

Suma MM
Ranch Hand

Joined: Apr 30, 2001
Posts: 31
I wanted to execute a simple servlet which extends HttpServlet. The compiler is unable to find the package javax! (I know i've messed something badly).
Ok now, I have downloaded jdk1.3.1_02. I dont see javax package anywhere. Need i download something else in order to "get" the javax package? And if so, how should the path and classpath variables be set?
I am a newbie to servlets. And moreover, i did try to "search" for an answer from the previously asked questions on this forum..but failed to!
I wud appreciate any help.
Thanks in advance.
Axel Janssen
Ranch Hand

Joined: Jan 08, 2001
Posts: 2164
1. You know you need a server to run servlets (?). Try tomcat. You get a very good step by step guide here:
2. To compile servlets you need to include a file called servlet.jar in your classpath. Follow the instruction in the above mentioned article. On JavaRanch there is a specialized forum regarding tomcat:
Hope it Helps.
Suma MM
Ranch Hand

Joined: Apr 30, 2001
Posts: 31
Thank You Axel. Will check out the links.
It is sorta covered in the JavaRanch Style Guide.
subject: ONE of the FAQs reg. HttpServlet
It's not a secret anymore!