Contents CHAPTER 1 Introduction to the environment 1.1 VisualAge for Java product family 1.1.1 VisualAge for Java Professional Edition 1.1.2 VisualAge for Java Entry Professional Edition 1.1.3 VisualAge for Java Enterprise Edition 1.1.4 VisualAge for Java Entry Enterprise Edition 1.1.5 Updates to Visual Age Java 1.2 Building your first applet 1.2.1 Let''s get started! 1.2.2 SmartGuide 1.2.3 The Workbench 1.2.4 Modifying your applet 1.2.5 Creating an animated applet 1.2.6 Changing the properties of the applet 1.3 Building your first application 1.3.1 Running a program as an applet and application 1.3.2 The VisuaAge for Java Source View window 1.4 The VisualAge for Java Scrapbook l.4.l Using the Scrapbook l.4.2 Scrapbook context l.4.3 Correcting errors in the Scrapbook l.4.4 If your Scmpbook page remains busy l.5 Customizing VisualAge for lava l.5.l Workbench Options l.6 Building yom first servlet CHAPTER 2 Organizing your code 2.1 Projects in VisualAge for Java 2.l.l Adding features 2.2 Packages in VisualAge for Java 2.3 The Workbench 2.3.l The Workbench Projects page 2.3.2 The Workbench Packages view 2.4 types from other packages 2.4.l Workbench Resomces page 2.4.2 The Workbench Classes page 2.4.3 The Workbencb Interfaces page 2.4.4 The Workbench AII Roblems page 2.5 Full source code edit 2.6 Code Assists 2.7 Importing and exporting with VisuaIAge for Java 2.7.l Imponing into VisualAge for Java 2.7.2 Exporting from VisualAge for Java CHAPTER 3 Migrating to Java2 3.l The Fix/Migrate SmartGuide 3.2 The repair process 3.3 Migrating your servlet and JSPs CHAPTER 4 Beginning the ATM Project 4.l Problem domain 4.2 Building the ATM model 4.2.l Use casss 4.2.2 ATM state diagrams 4.2.3 Analysis class diagram 4.2.4 Design class diagrams 4.2.5 Interaction diagram 4.3 Overall architecture 4.3.l The big picnlle 4.3.2 GUI clieat 4.3.3 Browser client 4.3.4 Database access 4.4 Example implementation 4.4.l Detailed steps implementing the first class 4.4.2 Reusing existing method to create a new method 4.4.3 PrimaryKey class hierarchy 4.4.4 Creating an inner class 4.4.5 Persistency based on HashMaps 4.4.6 Finder methods 4.4.7 Implemenutions of the state diagram 4.4.8 Test application CHAPTER 5 Creating servlets 5.1 Overview of Java servlets 5.2 The Java Servlet API 5.3 Building the ATM application servlets CHAPTER 6 Creating JSPs 6.1 Java Server Pages 6.2 How Java Server Pages work 6.3 JSP intemctions 6.4 Invoking a JSP by URL 6.4.l Calling a servlet from a JSP 6.5 JSP O.91 and l.0 6.6 Designing dte JSP model 6.6.l Model-View-Controller MVC 6.6.2 Servlet based modelinS 6.7 Building the ATM application 6.7.l JSP tags CHAPTER 7 Creating GUI application 7. l Abstract Windowing Toolkit and Java Foundation Classes retiesher 7.2 Visual Composition Editor 7.2.l The Beans Palene 7.2.2 Modification of dle Beans Palette 7.2.3 Visual Composition Editor toolbar 7.2.4 The free-form surface 7.3 Working with beans in the Visual Composition Editor 7.3.l Adding beans 7.3.2 Customlzd g Beans 7.3.3 Naming beans 7.3.4 Beans List 7.3.5 Factory and variable 7.4 Visualho 7.4.l The ATM classes created 7.4.2 Building the CardBean class 7.4.3 Building the CardBeanHome class 7.4.4 Building the BankAccountBean class 7.4.5 Buildiing the ATM application 7.4.6 Connections 7.4.7 Connection propenies 7.4.8 Creating connections CHAPTER 8 Versioning your code 8.l introduction to versioning 8.l.l Program elements 8.2 Workspace versus repository 8.2.l The workspace is only a cache 8.2.2 Backup or restore the workspace 8.2.3 Clean workspace copy 8.2.4 Multiple workspaces on one repository 8.2.5 Baekup or restore the repository 8.2.6 Workspace versus repository continued 8.3 Version control 8.3.l Edifions and versions 8.3.2 Consequences of versioning 8.3.3 How to version elements with VisualAge for Java 8.3.4 Apply this to the ATM application 8.3.5 Methods, a special case 8.3.6 Importance of versioning your code regularly 8.3.7 Fields and inner classes 8.3.8 Venioning resource files 8.4 Using editions 8.4.l Method edition tab 8.4.2 Comparison result window 8.4.3 Merging compared elements 8.4.4 Types edition tab 8.4.5 Packages edition tab 8.4.6 Projects edition tab 8.4.7 Replacing cunent edition 8.4.8 Extemal versioning systems 8.5 Import and export effects 8.5.1 Import and export with Java files 8.5.2 Import and export with repository files 8.6 Repository Explorer 8.6.1 Purging and restoring elements 8.6.2 Compacting a repository 8.6.3 Go To tools 8.6.4 Solutions CHAPTER 9 Testing and debugging the Web application 9.1 VAJ Debugger 9.1.l The debugger 9.l.2 The Debug Page 9.1.3 The Breakpoints Page 9.l.4 External Debug 9.l.5 Generating a Class Trace 9.l.6 Performance and the Class Trace option 9.l.7 Inspectors 9.1.8 The Inspector wiodow 9.2 WebSphere Test Environment WfE 9.2.1 Start the WebSphere Test Envimnment 9.3 Testiag JSPs under WebSphere Test Envimnment 9.3.l VisuaIAge for Java configuration for JSPs 9.3.2 Runniog a simple JSP 9.4 Debugging servlet and JSPs 9.4.l Debugging a servlet 9.4.2 JSP Execution Monitor 9.4.3 Debugging JSP generated source code 9.4.4 Debuggiog JSP without importing 9.5 Penistent Name Server 9.6 WebSphere Test Environment-advanced configmation 9.6.l Types of resources 9.6.2 Resource locations 9.6.3 The key con8guration files 9.7 WebSphere Test Environment-multiple Web applicatioas 9.7.1 Configuring multiple Web applications 9.7.2 Using the SewletEngineCon8gDumper seNlet CHAPTER 10 Using relational databases 1O.l JDBC 2.0 10.l.1 DataSource versus DriverMana5er 1O.2 Queries antl result seB 1O.3 Stored procedures 1O.4 Updating qte database 1O.5 Using SQLJ inside Visual Age for Java 1O.6 Data access beans 1O.7 Making the ATM penistent 1O.7.l Prerequisites 1O.7.2 Creating tables 1O.8 Making the card class persistent 1O.9 Creating the Select beans 1O.9.l Card Select bean 1O.9.2 Card Select All bean 1O.9.3 CardAcctSelect 1O.1O Modify beans 1O.1O.l Card Blsen 1O.1O.2 Card Delete 1O.1O.3 Cald Update 1O.1O.4 Caltl Visual Composition Editor View 1O.1O.5 Modifying related methods 1O.ll Data Access Beans with an application CHAPTER 11 Internationalization ll.l Java Intemationalization Framework 11.1.1 Locales 1l.l.2 Resource bundle ll.2 Internationalization in VisualAge for Java 1l.3 Building a langnage panel 1l.3.l LanguagePanel view 1l.3.2 Cleating the resource bundles 1l.4 Dynamicany changing the locale ll.4.1 Loading resource bundles 1l.4.2 Reuieving resomces from resource bundles 1l.4.3 Finishiag the LanguagePanel 1l.4.4 Formatting dates and times 11.5 Other intemationalization considerations l1.5.l Using predefined formats ll.6 Intemationalization in the Web envimnment ll.7 Character codes on the Web CHAPTER 12 Deploying the Web application 12.l Before yon start 12.2 Using WebSphere Application Server 12.2.l Deploying a Web application 12.2.2 Planniag fm multiple Web applications 12.2.3 Deploying a JSP 12.3 Deploying an application 12.3.l Include Referenced Types 12.4 Deploying an applet 12.4.l Web browsen 12.4.2 CLASSPATH or CODEBASE 12.4.3 Applet Tags 12.4.4 Deploying dle ATMApplication applet 12.4.5 Deploying supporting code APPENDIX JSP tag syntax JSP tag syntax summary WebSphere specific tags