How to run a servlet program?

Answer Posted / suresh

we have make dir name is,WEB-INF is the root directory
WEB-INF
--classes dir
--lib dir
--src dir
--web.xml
-html file
-dhtml file
-jsp file

lib dir contains
--jasper-runtime.jar
--servlet-api.jar
--jsp-api.jar

your source code put in the src dir

--put the WEB-INF dir in your tomcat server and run the servlet

Is This Answer Correct ?    27 Yes 15 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How printwriter is different from servletoutputstream?

579


What is Request Dispatcher?

801


Explain the lifecycle of a servlet?

504


How servlet is created?

542


Why is a constructor needed in a servlet even if we use the init method?

602






What is the use of httpservletrequestwrapper and httpservletresponsewrapper?

538


What is the difference between a generic servlet and http servlet?

517


What are the life-cycle methods for a servlet?

551


What are Servlets?

596


What is servlet and its advantages?

521


What is java servlet session?

526


How can you push data from an Applet to a Servlet?

605


Explain the features are in servlet 3?

601


What are the phases of a servlet life cycle?

617


Explain web application directory arrangement?

587