Hi Ravi,
Yes, we need to first compile the file through javac. Say you are trying to
build a HelloWorld servlet, these are the things you need to do :
1. Make sure that the JSDK files are in the CLASSPATH
2. Save the file as HelloWorld.java and compile it
3. If you are using the servlet container provided with JSDK, move the class
file to :
<JSDK Install Directory>WebPages/WEB-INF/servlets
4. Run the startserver.bat file to get the ServletRunner going
5. Type http://localhost:8080/servlet/HelloWorld into your browser's address
box, now you should be able to see your browser call the HelloWorld servlet
Note : If you have problems accessing via localhost, try using 127.0.0.1.
the javax.Servlet errors should also be cleared by now. Check it out.
Balu
> ----------
> From: RAVIKUMAR CHENGALVALA[SMTP:[EMAIL PROTECTED]]
> Reply To: A mailing list for discussion about Sun Microsystem's Java
> Servlet API Technology.
> Sent: Wednesday, February 16, 2000 9:05 PM
> To: [EMAIL PROTECTED]
> Subject: PRE-REQUISITES FOR COMPILING A SERVLET CODE
>
> 1)I TRIED TO COMPILE A SAMPLE SERVLET CODE.I AM USING JSDK2.1.
> 2)CAN I ISSUE A COMPILE COMMAND through jdk/bin/javac xxx.java or not
> 3)I am getting misc errors like javax.Servlet not found,similarly
> all other packages I am using.
>
> --
> RAVIKUMAR CHENGALVALA
> [EMAIL PROTECTED] - email
> (858) 860-6400 x7011 - voicemail/fax
>
>
>
> __________________________________________________
> FREE voicemail, email, and fax...all in one place.
> Sign Up Now! http://www.onebox.com
>
> __________________________________________________________________________
> _
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html