How to run a servlet program?

Answer Posted / giridhar gangapatnam

Sampleapplication
-- any html or jsp pages
-- WEB-INF
--web.xml
--lib(which contains any jar files)
--classes
--(all Servlet .class files)


After compilation of Servlet .java files start the Tomcat
Server and in URL type like:
http://localhost:8080/Sampleapplication/.html(or).jsp <--(enter)

Is This Answer Correct ?    5 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can you use a servlet to generate a plain text instead of html?

900


What's the difference between servlets and applets?

787


what is servlet chaining?

853


What are the differences between servlet context vs servlet config?

841


Differentiate between get and post?

914


Which exception is thrown if the servlet is not initialized properly?

812


What do you mean by singlethreadmodel interface?

818


Explain the features are in servlet 3?

845


What is pure servlet?

953


How do you invoke a Servlet? What is the difference between doPost method and doGet method?

879


Differentiate between the get and post method

829


Explain session tracking and its importance?

764


Which java framework is most popular?

810


How does Cookies work in Servlets?

917


What if you need to span your transaction across multiple servlet invocations?

827