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 if you need to span your transaction across multiple servlet invocations?

582


What is http servlet?

584


What is session tracking?

698


Which protocol will be used by browser and servlet to communicate

583


How can you create a session in servlet?

596






What are the exceptions thrown by servlets? Why?

625


How do you design microservices?

625


Is servlet synchronized?

605


Explain url encoding?

519


What is servlet invoker?

602


What is difference between GenericServlet and HttpServlet?

571


What is the type of method for sending request from http server?

596


What do you mean by cgi in servlet?

631


What is cgi?

598


What is the difference between the getrequestdispatcher(string path) method of javax.servlet.servletrequest interface and javax.servlet.servletcontext interface?

568