How to run a servlet program?

Answer Posted / kunal sagar

first we con compile the java code throught javac compiler.
then,its .class file will be created that .class file copy
and paste the in the directory
c:/program files/apache/tomcat/webapps/servlet/web-inf
/classes.
then back one step backward
change the servlet code with ur file name
and also sevlet mapping code with ur file name
save that file
then open explorar
and type the local host address

Is This Answer Correct ?    18 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of welcome-file-list?

768


How can we refresh automatically when new data is entered into the database?

840


What is servlet in tomcat?

786


What is the procedure for initializing a servlet?

750


When Servlet is unloaded?

843


Explain session tracking and its importance?

745


What is cookie in servlet?

786


What’s the difference between forward() and sendredirect() methods?

789


What is the difference between 2 types of servlets?

869


What are the types of servlet?

905


What is url encoding and url decoding

848


What is new in ServletRequest interface ? (Servlet 2.4)

792


What is servlet and its life cycle?

838


What are the difference between RMI and Servlets?

1257


What is the process for chaining servlet?

792