150+ Advanced Java Servlet API Interview Questions 2020-2021 - 1
Question: 1
What is URL rewriting?
It’s based on the concept of attaching a unique ID (which is generated by the server) in the URL of response from the server. So the server attaches this unique in each URL. When the client sends a requests it sends back this ID with the request also which helps the server to identify the client uniquely.
Question: 2
What are include directives?
The include directive informs the JSP engine to include the content of the resource in the current JSP page. Below is the syntax for include statement.
<%@ include file = “Filename” %>
Below is a code snippet which shows include directive in action
<html>
<head>
<title>Directives in action</title>
</head>
<%@ include file = “/ companyname.html” %>
<body><h1>Directive in action </h1>
</body>
</html>
Question: 3
What are the objects that are received when a servlet accepts a call from client?
The objects are ServletRequest and ServletResponse. The ServletRequest encapsulates the communication from the client to the server.
While ServletResponse encapsulates the communication from the servlet back to the client.
Question: 4
How does JSP engines instantiate tag handler classes instances?
JSP engines will always instantiate a new tag handler instance every time a tag is encountered in a JSP page.
A pool of tag instances are maintained and reusing them where possible. When a tag is encountered, the JSP engine will try to find a Tag instance that is not being used and use the same and then release it.
- Java Servlets and JSP Interview Questions and Answers
- Java Servlet Interview Questions for Freshers Pdf
- Java Servlet Interview Questions and Answers for Experienced Pdf
- Top 150+ Java Servlet Interview Questions and Answers
- Java Concurrency Interview Questions and Answers
- Advanced Java Interview Questions and Answers
- Tricky Servlet Interview Questions and Answers
- 150+ Advanced Java Servlet API Interview Questions 2020-2021
Computer Proficiency Test Question Paper Pdf More
C++ Programming Coding Questions and Answers Pdf More
C Programming Viva Questions and Answers Pdf More
OOPS Objective Questions and Answers Pdf More
C Programming MCQ Questions and Answers Pdf More
World History MCQ for Competitive Exams Pdf More
1000+ GK Quiz More
Soils, Vegatation and Animals Questions and Answers More
TNPSC Group 2 Previous Year Question Papers with Answers More
7000+ Probability Questions for IBPS, SBI PO, SO, Clerk Bank Exams More