JSP Standard Tag Library Part 3-Java Programming-Lecture Slides, Slides of Java Programming

This is an Introductory course of Java Web Programming focusing on writing maintainable extensible code, methods of debugging, logging and profiling. The Java Technology used is J2EE an Enterprise Application Development tool. This lecture includes: Tag, Library, Standard, JSP, Writer, SQL, MVC, Architecture, DataSource, XML, Parsing, XPath

Typology: Slides

2011/2012

Uploaded on 08/09/2012

dhanyaa
dhanyaa 🇮🇳

4.7

(3)

60 documents

1 / 18

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
<c:out>
Evaluates an expression and outputs the result of the
evaluation to the current JspWriter object
If the result of the evaluation is a java.io.Reader object,
data is first read from the Reader object and then
written into the current JspWriter object
improved performance
Syntax
<c:out value="value" [escapeXml="{true|false}"]
[default="defaultValue"] />
If escapeXml is true, escape character conversion
docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12

Partial preview of the text

Download JSP Standard Tag Library Part 3-Java Programming-Lecture Slides and more Slides Java Programming in PDF only on Docsity!

<c:out>

 Evaluates an expression and outputs the result of the evaluation to the current JspWriter object  If the result of the evaluation is a java.io.Reader object, data is first read from the Reader object and then written into the current JspWriter object  improved performance  Syntax  <c:out value="value" [escapeXml="{true|false}"] [default="defaultValue"] />  If escapeXml is true, escape character conversion

Example: <c:out>

quoted from /elsupport/Out.jsp

no cell phone specified

Example: <c:out>

quoted from /elsupport/Out.jsp

Database Access Tags

(SQL Tags)

.jsp Database Dynamic Content

MVC Architecture

Resource bundle identified by context parameter Beans SQL Business Logic

.jsp Database

SQL Tags

Query the database <sql:query> Easy access to result set Result ResultSupport Update the database <sql:update> <sql:transaction>

Example: <sql:setDataSource> for setting a table using PointBase <sql:setDataSource var="example" driver="com.pointbase.jdbc.jdbcUniversalDriver" url="jdbc:pointbase:server://localhost: 1092 /jstlsample; create=true" />

Example: <sql:transaction> &

<sql:update> from /sql/QueryDirect.jsp

<sql:transaction dataSource="${example}"> <sql:update var="newTable"> create table mytable ( nameid int primary key, name varchar( 80 ) ) </sql:update> <sql:update var="updateCount"> INSERT INTO mytable VALUES ( 1 ,'Paul Oakenfold') </sql:update> <sql:update var="updateCount"> INSERT INTO mytable VALUES ( 2 ,'Timo Maas') </sql:update> ... <sql:query var="deejays"> SELECT * FROM mytable </sql:query> </sql:transaction>

XML Tags

XML Tags

 Flow control  <x:choose>, <x:when>, <x:if>, <x:otherwise>  Iteration  <x:forEach>  General purpose  <x:out>  <x:set>  Parsing and Transformation  <x:parse>  <x:transform> with <x:param> subtags

Quick XPath

Review (Start)

Example XML Document Lux 1 swimming 23 M Den 1 cycling 18 F Den 2 sailing 27 M