Bank exam questions and answers

Group exam questions and answers

Technical questions and answers

1. What is servlet?
A servlet is a Java programming language class that is used to extend the capabilities of servers that host applications accessed by means of a request- response programming model. Before the servlet, CGI scripting language was used as server side programming language.
2. How servlet is loaded?
The servlet is loaded by: First request is made. Server starts up (auto-load). There is only a single instance which answers all requests concurrently. This saves memory and allows a Servlet to easily manage persistent data. Administrator manually loads.
3. What are the new features added to Servlet 2.5?
Following are the changes introduced in Servlet 2.5: A new dependency on J2SE 5.0 Support for annotations Loading the class Several web.xml conveniences A handful of removed restrictions Some edge case clarifications
4. What are the advantages of jsp over servlet?
The advantage of JSP is that they are document-centric. Servlets, on the other hand, look and act like programs. A Java Server Page can contain Java program fragments that instantiate and execute Java classes, but these occur inside an HTML template file and are primarily used to generate dynamic content. Some of the JSP functionality can be achieved on the client, using JavaScript. The power of JSP is that it is server-based and provides a framework for Web application development.
5. What is the difference between using getSession(true) and getSession(false) methods?
getSession(true) – This method will check whether already a session is existing for the user. If a session is existing, it will return that session object, Otherwise it will create new session object and return taht object. getSession(false) – This method will check existence of session. If session exists, then it returns the reference of that session object, if not, this methods will return null.
6. How can we create deadlock condition on our servlet?
one simple way to call doPost() method inside doGet() and doGet()method inside doPost() it will create deadlock situation for a servlet. This is rather simple servlet interview questions but yet tricky if you don’t think of it
7. What is servlet interface?
The central abstraction in the Servlet API is the Servlet interface. All servlets implement this interface, either directly or more commonly by extending a class that implements it.
8. How is scripting disabled?
Scripting is disabled by setting the scripting-invalid element of the deployment descriptor to true. It is a subelement of jsp-property-group. Its valid values are true and false.
9. What is the output comment?
The comment which is visible in the source of the response is called output comment.
10. What is URL rewriting?
 URL rewriting is a method of session tracking in which some extra data is appended at the end of each URL. This extra data identifies the session. The server can associate this session identifier with the data it has stored about that session.
div itemprop="description">AptTree.com is enhanced solution for learning and training all categories of Group&bank Questions and Answers.
Date published: 01/01/2015
5 / 5 stars