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 do I know if java is running on linux?

797


What is the difference between forward () and sendredirect () functions in servlet? Explain

753


What is httpservlet class?

757


When is the servlet instance created in the life cycle of servlet? What is the importance of configuring a servlet?

783


Which application server is best for java?

771


Which java framework is most popular?

776


How do servlets work?

764


Is it good idea to create servlet constructor?

988


Write all the phases defined in servlet life cycle?

765


What is a web container and what is its responsibility?

731


Servlet is pure java object or not?

924


How can we invoke another servlet in a different application?

926


What are the difference between session and cookies in servlet? Explain

797


What is http servlet in java?

764


Given the request path below, which are context path, servlet path and path info?

762