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

How do you define a servlet?

525


How can the session in servlet can be destroyed?

712


Write a servlet to upload file on server.

599


Explain the difference between servlet and cgi?

611


What’s the difference between forward() and sendredirect() methods?

575






How is a servlet implemented in code?

568


How would you create deadlock on your servlet?

622


What is the difference between servlet and filter?

530


What is cgi?

598


What is difference between ServletResponse sendRedirect() and RequestDispatcher forward() method?

620


What are the different methods involved in the process of session management in servlets?

670


Whether we can get deadlock situation in servlets?

578


How is an application exception handling is done using a servlet?

539


Why do we have servlet filters?

603


How native code can be used in a servlet?

3520