Thursday, October 7, 2010

Web Development with JavaServer Pages












1 Introduction 1
1.1 What is JSP? 2
1.2 Evolution of dynamic content technologies 2
Common Gateway Interface 3 ColdFusion 5
Active Server Pages 6 Server-Side JavaScript 6
PHP 7 Java servlets 7 JavaServer Pages 9
1.3 JSP and Java 2 Enterprise Edition 10
Java platform editions 11 Web-based applications 11
1.4 JSP benefits 13
Performance 13 Reusable components 16
Separating presentation and implementation 17
Achieving division of labor 19
2 Fundamentals 21
2.1 Writing your first JSP 22
About the examples 22 Hello, World! 22
Hello, World! revisited 23 Hello, World! the Bean
edition 25 Hello Real World 27
2.2 Tag conventions 28
Scripting-oriented tags 29 XML-based tags 29
2.3 Running JSP 31
Adding JSP support 32 How JSPs work 33
Buffered output 38 Session management 40
Scalability 43 Error handling 46
3 Programming JSP scripts 49
3.1 Scripting languages 50
3.2 JSP tags 52
3.3 JSP directives 52
Page directive 52 Include directive 63
Tag library directive 65
3.4 Scripting elements 67
Declarations 67 Expressions 71 Scriptlets 74
3.5 Flow of control 76
Conditionalization 76 Iteration 77 Exception
handling 77 A word of caution 80
3.6 Comments 81
Content comments 81 JSP comments 81
Scripting language comments 82
4 Actions and implicit objects 84
4.1 Implicit objects 85
Servlet-related objects 87 Input/Output 88
Contextual objects 95 Error handling 103
4.2 Actions 104
Forward 104 Include 108 Plug-in 110
Bean tags 110
5 Using JSP components 111
5.1 The JSP component model 112
Component architectures 112 Benefits of a component
architecture 112 Component design for web
projects 114 Building applictions from components 115
5.2 JavaBean fundamentals 117
The different types of JavaBeans 120
5.2 JSP Bean tags 122
Tag-based component programming 122 Accessing JSP
components 124 Initializing Beans 132
Controlling a Bean’s scope 139
6 Developing JSP components 147
6.1 What makes a Bean a Bean? 148
Bean conventions 148 The Bean constructor 149
Defining a Bean’s properties 150 Indexed
properties 154 Boolean properties 158
JSP type conversion 159 Configuring Beans 161
6.2 Some Examples 162
Example: a TimerBean 162
A Bean that calculates interest 165
6.3 Bean interfaces 169
The BeanInfo interface 169 The Serializable
interface 170 The HttpSessionBindingListener
interface 171 Other features of the Bean API 172
6.4 Mixing scriptlets and Bean tags 173
Accessing Beans through scriptlets 173
Accessing scriptlet created objects 173
7 Working with databases 178
7.1 JSP and JDBC 179
JNDI and data sources 180 Prepared statements 181
7.2 Database driven JSPs 182
Creating JSP components from table data 182
JSPs and JDBC data types 185 Maintaining persistent
connections 188 Handling large sets of results 191
Transaction processing 196
7.3 Example: JSP conference booking tool 197
Project overview 198 Our database 198
Design overview 198
8 Architecting JSP applications 209
8.1 Web applications 210
Web application flow 212
Architectural approaches 213
8.2 Page Centric Design 213
Role-based pages 213 Building composite pages 216
Limitations of the page-centric approach 218
8.3 Servlet-centric design 219
Hello, World—with servlets 220 JSP and the servlet
API 221 Servlets for application control 224 Servlets
for handling application logic 225 Servlets as single
entry points 226 Handling errors in the servlet 230
Example: servlet-centric employee browser 230
EmployeeBean 232 FetchEmployeeServlet 235
JSP employee list 238 JSP page viewer 239
8.4 Enterprise JavaBeans 241
What are Enterprise JavaBeans? 241 JavaBeans vs.
EJBs 241 Application servers and EJB containers 242
Application design with EJBs 243
8.5 Choosing an appropriate architecture 244
Application environment 244 Enterprise software
requirements 246 Performance, scalability, and
availability 246 Technical considerations 247
Organizational considerations 248
9 An example JSP project 250
9.1 Introduction 251
Project motivations 251 Application requirements 251
Application modules 253 Building a FAQ
component 254
9.2 The storage module 256
Database schema 257 The FaqRepository class 257
Storage module exceptions 263
9.3 The administration module 264
The administration servlet 265 The main menu 272
Adding an FAQ 275 Deleting an FAQ 279
Updating an FAQ 285
9.4 The web access module 290
The FaqServlet 290 Viewing a single FAQ 292
Viewing all the FAQs 293 A table of contents view 294
Plain text view 296
10 Deploying JSP applications 297
10.1 This means WAR 298
WAR is XML 299 Waging WAR 301
10.2 The art of WAR 302
WAR materiel 303
Drafting deployment descriptors 307
10.3 Maintaining a WAR footing 319
11 Performing common JSP tasks 321
11.1 Handling cookies 322
Managing cookies 322 The Cookie class 323
Example 1: setting a cookie 324
Example 2: retrieving a cookie 326
11.2 Creating error pages 329
An erroneous page 330 Data collection methods 330
Sending electronic mail 335 The error page 337
11.3 Mixing JSP and JavaScript 340
11.4 Building interactive interfaces 344
Sticky widgets 344 Utility methods 345 The example
form 347 Setting up the form 349 Text and hidden
fields 349 Text areas 350 Radio buttons 350
Select boxes 351 Check boxes 352 Form source 352
11.5 Validating form data 354
Client- and server-side validation 355
Example: server-side validation 356
11.6 Miscellaneous tasks 361
Determining the last modification date 362
Executing system commands 363
Generating XML 364
12 JSP by example 366
12.1 A rotating banner ad 367
The BannerBean 367 Using the Bean 368
12.2 A random quote generator 370
The QuoteBean 370 Using the Bean 371
12.3 The Tell a Friend! sticker 372
The sticker 373 The MailForm page 375
Sending the mail 376
12.4 A JSP Whois client 378
The Whois protocol 378 Requirements and design
considerations 380 The WhoisBean 380
Building the front end 388
12.5 An index generator 391
A basic implementation 391 An improved version 394
Going further 398
12.6 A button to view JSP source 398
Displaying the source 399 Limitations of the view source
program 401 Adding a view source button to a
page 401 Viewing source through a bookmark 401
13 Creating custom tags 403
13.1 Role of custom tags 404
13.2 How tag libraries work 405
13.3 Tag library descriptors 408
Library elements 409 Tag elements 410
Attribute elements 411
13.4 API overview 412
Tag handlers 412 Helper classes 416
Auxiliary classes 418
13.5 Example tag library 419
13.6 Content substitution 420
13.7 Tag attributes 422
13.8 Content translation 427
URL rewriting 427 HTML encoding 431
13.9 To be continued 435
14 Implementing advanced custom tags 436
14.1 Interacting tags 437
Interaction mechanisms 437 Outlining tags 439
14.2 Flow of control 449
Conditionalization 450 Iteration 458
14.3 Packaging the tag library 475
14.4 For further information 476
A Running the reference implementation 477
A.1 Prerequisites 478
A.2 Installation 478
A.3 Constructing an application 485
B Incorporating Java applets 489
B.1 Browser support for Java 2 489
B.2 The plug-in action 491
B.3 Example: applet configuration 496
C JSP resources 503
C.1 Java implementations 503
C.2 JSP-related web sites 504
C.3 JSP FAQs and tutorials 504
C.4 JSP containers 505
C.5 Java application servers with JSP support 505
C.6 JSP development tools 506
C.7 Tools for performance testing 506
C.8 Mailing lists and newsgroups 507
D JSP syntax reference 508
D.1 Content comments 508
D.2 JSP comments 509
D.3 510
D.4 511
D.5 512
D.6 513
D.7 514
D.8 515
D.9 516
D.10 517
D.11 518
D.12 520
D.13 521
D.14 522
E JSP API reference 524
E.1 JSP Implicit Objects 525
E.2 Package javax.servlet 525
E.3 Package javax.servlet.http 530
E.4 Package javax.servlet.jsp 535
E.5 Package javax.servlet.jsp.tagext 539
index 545

Download
Another Web Programming Books

2 comments:

  1. Its really good books for providing nice information about java, java development with latest coding standard and methods

    ReplyDelete

Related Posts with Thumbnails

Put Your Ads Here!