Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Compiling the servlet

  Asked By: Charlie    Date: Oct 01    Category: Java    Views: 721
  

I am using TOMCAT

I hace tried a simple servlet. I have tried it ti compile it in jdk.\bin but it
dit not compiled.

Please help me that how should I compile the servlet, where should I compile it
and then how should I use it in the TOMCAT.

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Adelmo Fischer     Answered On: Oct 01

u have to do some presteps to compile  n run the servlet  in tomcat.
first u have to set enviroment variables..

JAVA_HOME= refers to ur jdk  ( like C:\jdk1.4 ) and

for tomcat  4.0 or higher
CATAIINA_HOME=refers to ur tomcat directory ( like C:\tomcat )

for tomcat lower then 4.0
TOMCAT_HOME=refers to ur tomcat directory ..

then u have to set path to servlet.jar which is under the tomcat directory
common/lib/servlet.jar
or u can copy n paste servlet.jar file under ur jdk folder jre\lib\ext

then u startup ur tomcat container then open the explorer n enter the address
http://localhost:8080/ into the location bar of the explorer..

i m sure if u do it fine ur servlet will compile n ready to run..

 
Didn't find what you were looking for? Find more on Compiling the servlet Or get search suggestion and latest updates.




Tagged: