how can we execute servelt?

what the use ".war" or ".jar" file creation

Answer Posted / ramesh

Whenever client send the request for the first time server will create servlet object and after that it was using that object until we undeploy or shutdown the server
Generally we deliver the project to the client in the form of jar files . Suppose the project is a webbased project we deliver that project in the form of war files . Suppose that project is a normal core java project we deliver that project in the form of jar files. But to create jar or war files we use 'jar' command only , but the extension will be changed

ex:jar -cvf myproject.jar
jar -cvf myproject.war

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When servlet is loaded?

589


What is the need of servlet filters?

538


How do servlets work?

532


What are the types of protocols supported by httpservlet ?

703


What are the common methods that are included in the http servlet class?

576






How to get the server information in a servlet?

683


Why do we have servlet filters?

595


What are the steps that are involved in using the httpservlet class?

569


What is generic servlet class?

596


What is a cookie What is the difference between session and cookie

590


Which application server is best for java?

554


What do you mean by httpservlet?

561


What are the life cycle methods of the servlet?

574


Why do we need a constructor in a servlet if we use the init method?

511


How can an existing session be invalidated?

657