Professional Portal Development with Open Source lools: Java' Portlet API, Lucene, James, SUde W. Clay Richardson Donald Avondolio Joe Vitale Peter Len Kevin T. Smith Wlley Technology Publishing ffi WlLEY Wiley Publishing, Ine.
Acknowledgments Introductlon Part I: Open Source Portals ChaRter 1: The Java Portlet API USR 168) Portlet Fundamentals Portlets and Servlets Portallnteractions The Portlet Interface and the GenerlcPortlet Portlet Life Cycle Portlet Runtime States Portlet Request Handling "There Can Be Only One" ActionRequest RenderRequest GenericPortlet Other Elements of the Java Portlet API PortletConfig PortletURL Portlet Modes Window States Portlet Context Portal Context Portlet Preferences Sessions Calling JSPs and Servlets Portlet Application Structure Security CSS Style Definitions User Information Attributes Portlet Tag Library Portlet Deployment Portlet Application Deployment Descrlptor Portlet Declarations Building a Portlet Ix xix 1 3 3 5 6 8 8 8 9 9 10 11 11 14 14 14 15 16 16 16 16 18 19 21 22 22 24 28 28 28 29 32 39
Chapter 2: Searchlng wlth Lucene Understandlng Search Englne Concepts The Anatomy of a Search Engine The Anatomy of Lucene Analyzer Document Directory Understandlng the Lucene Query Syntax Terms Fields Term Modifiers Boolean Operators, Grouping, and Escaping Optlmlzlng Lucene's Performance Chapter 3: Messaglng wlth Apache James Introduclng James Working with Mailets and Matchers Bundled Matchers Bundled Mailets Understanding SpoolManager Understanding Repositories File Repositories Database Repositories DBFile Repositories Working with RemoteManager Implementlng James Downloading James Installing James Conflgurlng James DNS Server Configuration POP3 Server Configuration SMTP Server Configuration NNTP Server Configuration FetchPOP Conflguratlon RemoteManager Configuration Repository Configuration SpoolManager Conflguratlon Global Server Configuration creanng User Accounts 41 41 43 48 51 53 55 57 57 59 59 60 61 62 63 63 65 65 66 66 66 67 67 68 68 68 68 69 xii
Introduclng JavaMall API The Session Class Message Class Address Class Authenticator Class Transport Class Store and Folder JavaMall In Practlce Sending Messages Receiving Messages ChaRter 4: Object to Relatlonal Mapplne wlth Apache OJB Explorlng ObJect-to-Relatlonal Mapplng Concepts Understandlng O.lB Technology Features Uslng OJB API Layers Developing with the PersistenceBroker API The Message Class JDBC Connection Mapping Home.jsp Add.jsp View.jsp Developing with the ODMG API Openlog a Database Retrieving Objects Storing Objects UpdatingObjects Deleting Objects Developing with the JDO API OJB Extras Verifying an OJB Installation Supported Database Platforms Supported JDBC Data Types Deploying OJB Applications Jar Files Metadata Files JDBC Drivers CLASSPATH Settings OJB Performance 70 71 71 72 72 73 73 74 74 79 86 87 87 88 89 90 93 99 100 104 106 107 107 107 108 109 109 110 110 111 111 112 113 113 xiii
Chapter 5: Cootem Maoaeemeot wlth Jakarta's Silde Silde Archltecture External Architecture Internal Architecture Transaction Management Transactions Transaction Attributes Namespaces Helpers Stores Domain Slide API Layer Setting Up and Conflgurlng Silde Installing and Running Slide Tomcat Manager The Silde Server Client View Admin View Editor View WebDAV and Silde Windows XP WebDAV Example ChaRter 6: Portal Securlty Core Securlty Concepts Authentication Authorization Single Slgn-On (SSO) Confidentiality Data Integrlty Non-repudiation Key Securlty Standards SSL and TLS XML Encryption XML Signature SAML OASIS Web Services Security (WSS) 117 117 118 120 122 123 123 124 124 132 132 135 135 135 136 138 139 139 139 139 140 143 145 145 145 146 147 149 150 150 150 150 151 151 151 153 xlv
Bulldlng Securlty Solutlons for Your Portal Web Container Security-Apache Tomcat Server Configuration Application Configuration Programmatic Security Access with JSPs and Servlets Security of the Portlet Container Programmatic Security Portlet Descriptor-Configured Security Beyond the Portal-Secure Back-End Communication Part 11: How to Build a Portal Chapter 7: PlannlOl~ for Portal Deployment System Requlrements Interface Requirements Operational Requirements Data Requirements Security Requirements Quality Assurance Requirements Software connguratton Management Jakarta's ANT Unit and Load Testing Bug Tracking Continuous Integration Requirements Software Design Methodologles The Unified Process (UP) Domain Model Software Architecture Document (SAD) Shall Statements and User Stories Class-Responsibility-Collaborator Cards (CRCs) Storyboarding Design Models for Visualization That Are Not in UML Design Declslons Modell Architecture Model 2 Architecture Model 2X Architecture Search Utlllties 153 1 155 165 167 168 169 170 171 172 173 175 177 177 177 178 178 179 179 180 180 181 181 181 182 182 184 186 189 190 190 193 195 196 197 197 200 xv
Content Management Design Pattern Conslderatlons In Your Portal Using Java Standards Model-View-Controller (MVC) Pattern Template Method Pattern Memento Pattern Facade Pattern Adapter Pattern Factory Method Pattern Singleton Pattern Front Controller Pattern Intercepting Filter Pattern Cllent-5lde Processlng JavaScrlpt Server-5lde Processlng Java Plug-ins Web Services for Remote Portals (WSRP) Portal Navigation Portal Navigation Using Taxonomies Portlet Integration Plan Chapter 8: Effective Cllent-Slde Development Uslne Javascrlpt Declarlng JavaScrlpt Valldatlng Data Addlng Functlonallty Field Auto-Population Field Auto-Validation Space Management Multiple-Value Picklists Repeating Values Dynamlc Actlons Layerlng and DHTML Forms and Layers Movable Layers Chaper 9: Developloe Applicatloos aod Workflow for Vour Portal The Portlet Archltecture The Portlet Container Portlet Preferences 200 201 202 207 207 208 209 210 212 218 220 221 222 223 227 228 229 231 231 234 240 244 244 250 253 255 255 256 258 xvi
JSP Tag Library Packaging a Portlet The exo Portal Platform The exo Portal Hot Deployment Customization Tool Setup and Installation of exo Understanding the exo Directory Structure The Dlrectory Portlet Developing the Directory Portlet The MySQL Database The DirectoryPortlet Class The DirectoryValidator Class The DirectoryView JSP File The DirectoryEdit JSP File The web.xml File The portlet.xml File Deploying the Directory Portlet in exo Portlet Creatlon the Model-Ylew-Controller (MYC) Way "rhe MYC Loan Calculator Portlet Web Appllcations versus Portlet Appllcatlons Chapter 10: Portlet Integration wlth web Services Basic Concepts Integrating with Tradltlonal Web Services A Simple Example First Approach: SOAP and WSDL Messaging Second Approach: Working with Generated Objects Web Services for Remote Portlets (WSRP) Types of WSRP Services Discovery, Registration. and Deregistration Services Simple WSRP Services-Stateless "View Only" Modes More Complex Services-Interactive WSRP Services Portlet Management Services WSRP Markup Guidelines for Portlet Developers Disallowed XHTML and HTML Tags Cascading Style Sheets (CSS) Style Definitions User Information 258 258 259 259 259 259 260 260 262 265 266 267 271 272 274 275 275 276 277 279. 283 283 285 285 287 292 292 298 302 304 304 304 304 305 305 305 305 310 310 xvii
Chapter 11: Performance lestlng, Admlnlsterlng, and Monitoring rour Portal Continuous Integration CVS Subversion JUnit AntHill Load lestlng.imeter Portal RequirementsjBug Management and lraeeability wlth Searab Scarab Scarab Tasks Portal Administration wlth JMX Portal Collaboratlon wlth JSPWlki 311 312 312 315 316 324 326 327 330 330 331 335 344 346 Chapter 12: Unlfylng the Enterprise Appllcatlon Space lhrougb Web Start Rleh Cllents Java Web Start Gettlng Started Downloading and Installing Java Web Start Configuring the Web Server Creatlng the JNLP File <jnlp> Attributes <information> Subelement <security> Subelement <resources> Subelement <appllcatlon-desc> Subelement Application Packaging Client Invocation Code Signing Introduetory Applieatlon Using JWS in Portal Implementatlons Use in a Web-based Portal Use in a Java Portal Java Swing Java-based Portal Examples Referenees Index 347 348 349 351 351 351 352 353 353 353 353 3 3 3 356 358 363 3 367 367 368 372 373 375 xviii