Java Interview Guide: How to Build Confidence With a Solid Understanding of Core Java Principles pdfdrive com



Yüklə 0,53 Mb.
Pdf görüntüsü
səhifə22/47
tarix06.05.2023
ölçüsü0,53 Mb.
#108601
1   ...   18   19   20   21   22   23   24   25   ...   47
Java Interview Guide

Object-Relational Mapping
Object-relational mapping (ORM) is a technique that bridges the gap between
objects and relational databases. An ORM decouples the persistence layer of an
application by generating SQL queries automatically. However, the relationship
between objects and tables needs to be defined through configuration files, and
it can be difficult to map complicated object hierarchies or address performance
concerns for queries that are automatically generated. Hibernate is a popular
ORM tool that is often used in conjunction with the Spring framework.


Questions
What is JDBC?
What are the two ways of acquiring a Connection object?
What is the difference between the three types of Statements?
What is a ResultSet?
What is an SQL injection attack? How can it be prevented?
What are the advantages and disadvantages of object-relational mapping?
What is Hibernate?


Web Applications
A web application is software that is delivered by a server and rendered
by a browser. Java provides support for web applications through the
Servlet API.


The Servlet API
The Servlet API provides the specification for a servlet container. A servlet
container handles an HTTP request by delegating the request to a web
application, which in turn delegates the request to a Servlet.
A web application is packed into a web archive called a WAR file. A WAR file
contains classes, libraries, and a deployment descriptor called web.xml.
A deployment descriptor is a configuration file that describes how an application
should be deployed. For example, the web.xml file tells the servlet container
which URL patterns map to Servlets.


Servlets
Servlets
are singleton objects that are managed by a servlet container.
The container invokes the init() method when the servlet is initially loaded.
Incoming requests are delegated to the service() method concurrently.
Finally, the container invokes the destroy() method when the application
is shutting down.
HttpServlet
is a Servlet implementation that contains methods
corresponding to HTTP requests, such as doGet(), doPost(), doPut(),
and doDelete(). HttpServlet provides access to request parameters
as well as a session object that can store state across requests. Sessions are
correlated by an identifier that is stored in a cookie by the browser.



Yüklə 0,53 Mb.

Dostları ilə paylaş:
1   ...   18   19   20   21   22   23   24   25   ...   47




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©azkurs.org 2024
rəhbərliyinə müraciət

gir | qeydiyyatdan keç
    Ana səhifə


yükləyin