Professional Documents
Culture Documents
What is JSP?
Mostly HTML page, with extension .jsp Include JSP tags to enable dynamic content creation Translation: JSP Servlet class Compiled at Request time (first request, a little slow) Execution: Request JSP Servlet's service method
Jsp architecture
response response Client
request
response
Component
request
request
Why JSPs?
Goal: Create dynamic web content (HTML, XML, ...) for a Web Application Goal: Make it easier/cleaner to mix static HTML parts with dynamic Java servlet code JSP specification ver. 2.0 Java Servlet specification ver. 2.4
Advantages
Action Elements
Standard Actions
<jsp:getProperty> Gets a property value from a JavaBeans component and adds it to the response <jsp:setProperty> Set a JavaBeans property value <jsp:include> Includes the response from a servlet or JSP page during the request processing phase <jsp:forward> Forwards the processing of a request to servlet or JSP page
The application also enables you to manage a data stored in a database for the online displayed books, such as: adding a book, adding a book category, modifying the book information.
To create the Shopping Cart application, we have used: JSP as server side scripting language, JavaScript for client side data validations, HTML for data display, Oracle as the database to store information.
Database Connectivity
Step1: loading a database driver Step2: creating a oracle jdbc connection Step3: creating a JDBC statement object Step4: executing a SQL statement with the statement object, and returning a JDBC result.
CODD RULES
The Information Rule Guaranteed Access Rule Systematic treatment of null values The database catalog must be relational too The system must implement a comprehensive data sublanguage Data views must be updatable
High level insert,update and delete Physical data independence Logical data independence Integrity independence Entity integrity Refrential integrity Distribution independence Nonsubversion
Thank You.!