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 will you pass values from HTML page to the servlet?

560


What is the life cycle of a servlet?

798


What is the use of httpservletrequestwrapper?

600


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

609


Is that servlet is pure java object or not?

652






What is the inter-servlet communication?

707


What is war file?

587


Write the code to get the server information in servlet.

587


Who is responsible for writing a constructor?

783


Explain the role of dispatcherservlet and contextloaderlistener.

614


I have a requirement Here we have a ResultSet object that will contain 50 records i need to print those recors in to a webpage(i.e; view according to MVC architectures that mybe servlet or jsp) . Here i need to print the records 10 per page that is 1 to 10 in page one and 11 to 20 in page two like remaining will be appeared in other pages we need to display those page numbers whenever we click on that page number we will go to that page and display 10 records like we will display 5 pages it is like this << 1 2 3 4 5 next >>

2538


If some new data has entered the database, explain how can a servlet refresh automatically?

745


How printwriter is different from servletoutputstream?

588


What’s the difference between sendredirect and forward methods

574


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

604