Académique Documents
Professionnel Documents
Culture Documents
For example
search engines, online stores, auctions, news sites, discussion groups, and games.
Because it is a type of client-server application (connected through internet or intranet),
the components of a web application are stored on either the client computer or the server
computer.
These web applications are stored on the server computer which runs software like
Apache HTTP Server, namely web servers that enables it to send web pages to web
browsers (the clients) that make the request for a particular web page.
The web browser provides the user interface for the application, but it does not care if the
HTTP response was received from the static HTML file or was dynamically generated by
the web application. Its duty is to display the HTTP response obtained as a HTML.
The server computer also runs a database management system, for JSP and Servlet
applications Oracle and mySQL are two common DB’s.
HTML – Hypertext Markup Language is the language that the web browser converts into
the web pages of a web application.
Static web pages – HTML document that’s stored in a file and does not change as
response to the user request. It comes with an extension of .htm or .html.
Dynamic web pages – HTML document generated by the web application based on the
parameters sent by the client as part of the HTTP request.
Web browser and server communicates through internet using the HTTP – Hyper Text
Transfer Protocol for sending and receiving message namely the HTTP request and the
HTTP response.
A servlet and JSP engine or servlet and the JSP container is the software that allows the
web server to work with servlets and the JSP. TOMCAT is one of the most popular sevlet
and JSP engine. For such a engine to work properly it should be able to access the Java’s
SDK.
Note: For a serious web application, the data is usually stored in a relational database.
However it may also be stored in binary files or text files or in XML files.
Difference between including the file at translation time and the request time:
Example : Example :
2 <%@ include file = “file Location And <jsp:include page = “file Location And
Name” %> Name” flush = “true” %>
Prepared Statements:
1) When you use the prepared statements in your java programs, the database server only
has to check for the syntax and prepare an execution plan for each SQL statement.
2) To specify the parameters for an SQL statements use the ‘?’, and to supply the values
for those parameters use the ‘set’ method of the java.sql.PreparedStatement interface.
3) To execute a SELECT statement use the executeQuery() method and to execute any
UPDATE or DELETE statement use the executeUpdate() method.
ResultSetMetaData:
This type of object contains information about the result set including the number of
columns and the names of the columns. To get those information use the
getColumnCount() and getColumnName() methods.