How to run a servlet program?

Answer Posted / anji

The structure of the web app. is
demo[root]
- all jsps will go her
- WEB-INF
- web.xml
- tld files
- classes
- all java class files will go here

Compile all the files and create a war file
copy the war file into Tomcat_root\webapps folder
if you use weblogic or webspehere the deployment will be
different.

Is This Answer Correct ?    41 Yes 28 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which event is fired at the time of setting, getting or removing attribute from application scope?

901


What is Request Dispatcher?

1104


What are the phases of a servlet life cycle?

868


How many servlet objects are created?

802


What are the types of Session Tracking ?

875


What are the types of protocols supported by httpservlet ?

967


When should you prefer to use doget() over dopost()?

874


What is a generic servlet?

719


What exactly are the functions of servlet?

840


Can we get PrintWriter and ServletOutputStream both in a servlet?

929


How do you get the ip address of the client in servlet?

772


Why do you use session tracking in httpservlet?

877


What do you mean by the servlet chaining?

820


Does servlet have main method?

934


What is the purpose of requestdispatcher interface?

849