Building Portals With The Java Portlet API

418 887 0
Building Portals With The Java Portlet API

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

CYAN MAGENTA YELLOW BLACK PANTONE 123 CV EMPOWERING PRODUCTIVITY FOR THE JAVA DEVELOPER Dear Reader, Pro Struts Applications Jeff Linwood and Dave Minter Dave Minter APRESS JAVA ROADMAP Beginning J2EE 1.4 Beginning Java Objects Enterprise Java Development on a Budget Beginning JSP Building Portals with the Java Portlet API with the Jeff Linwood, co-author of How you bring your existing applications into the portal? How you integrate your content management system and search engine with the portal? How you get started with the portlet API? We show you how to solve real problems, like the ones we have seen as consultants and software developers We cover the portlet API in depth, explaining the concepts and classes with example scenarios and code When you are comfortable with the portlet API, we examine portal integration techniques, Single Sign-On, content management, charting, personalization, application and content syndication, and searching We believe that with the remarkable cooperation in unifying the portlet API across many different vendors, using standards for portals is now the best choice Our examples will therefore run on any portal that supports the portlet API We avoid proprietary tools, instead showing how to incorporate several open source software projects into your portlets, including XDoclet, Apache Jakarta Lucene, and JFreeChart Our backgrounds as developers and consultants lead us to look for books that concentrate on solving real problems with new technologies, not just explaining their details We hope that this book will help you to solve problems using the portlet API Building Portals Java Portlet API Building Portals with the Java Portlet API THE EXPERT’S VOICE ® IN JAVA Includes Includes Pluto, Lucene, and and XDoclet Building Portals with the Java Portlet API Learn how to create portlet applications, integrate existing web applications, and incorporate XDoclet, Apache Jakarta Lucene, JFreeChart, and other open source projects Join online discussions: forums.apress.com SOURCE CODE ONLINE FOR PROFESSIONALS BY PROFESSIONALS ™ ISBN 1-59059-284-0 54999 US $49.99 Linwood and Minter www.apress.com Jeff Linwood and Dave Minter Foreword by Ian Griffiths Shelve in Java User level: Intermediate–Advanced 89253 15840 781590 592847 www.traintelco.com this print for content only—size & color not accurate spine = 0.790" 416 page count Praise for Building Portals with the Java Portlet API : “The book gives a solid introduction to developing a portal Clearly the authors understand portal development and know how to pass that information on to their readers.” —Thomas Paul, JavaRanch (www.javaranch.com) “The text is well written and easy to read; graphics and illustrations are used sparingly and to great effect.” — Jack Herrington, Code Generation Network (www.codegeneration.net) www.traintelco.com 2840chFM.qxd 7/13/04 12:43 PM Page i Building Portals with the Java Portlet API JEFF LINWOOD, DAVE MINTER www.traintelco.com 2840chFM.qxd 7/13/04 12:43 PM Page ii Building Portals with the Java Portlet API Copyright © 2004 by Jeff Linwood, Dave Minter All rights reserved No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher ISBN (pbk): 1-59059-284-0 Printed and bound in the United States of America Trademarked names may appear in this book Rather than use a trademark symbol with every occurrence of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark Lead Editor: Steve Anglin Technical Reviewer: Carsten Ziegeler Editorial Board: Steve Anglin, Dan Appleman, Ewan Buckingham, Gary Cornell, Tony Davis, John Franklin, Jason Gilmore, Chris Mills, Steve Rycroft, Dominic Shakeshaft, Jim Sumser, Karen Watterson, Gavin Wray, John Zukowski Project Manager: Kylie Johnston Copy Edit Manager: Nicole LeClerc Copy Editor: Liz Welch Production Manager: Kari Brooks Production Editor: Ellie Fountain Compositor: Kinetic Publishing Services, LLC Proofreader: Nancy Sixsmith Indexer: James Minkin Artist: Kinetic Publishing Services, LLC Cover Designer: Kurt Krames Manufacturing Manager: Tom Debolski Distributed to the book trade in the United States by Springer-Verlag New York, Inc., 175 Fifth Avenue, New York, NY 10010 and outside the United States by Springer-Verlag GmbH & Co KG, Tiergartenstr 17, 69112 Heidelberg, Germany In the United States: phone 1-800-SPRINGER, e-mail orders@springer-ny.com, or visit http://www.springer-ny.com Outside the United States: fax +49 6221 345229, e-mail orders@springer.de, or visit http://www.springer.de For information on translations, please contact Apress directly at 2560 Ninth Street, Suite 219, Berkeley, CA 94710 Phone 510-549-5930, fax 510-549-5939, e-mail info@apress.com, or visit http://www.apress.com The information in this book is distributed on an “as is” basis, without warranty Although every precaution has been taken in the preparation of this work, neither the author(s) nor Apress shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in this work The source code for this book is available to readers at http://www.apress.com in the Downloads section www.traintelco.com 2840chFM.qxd 7/13/04 12:43 PM Page iii Contents at a Glance Foreword xi About the Authors xiii About the Technical Reviewer xiv Acknowledgments xv Introduction xvii Chapter Introduction to Portals and Portlets Chapter Portlet Basics 11 Chapter The Portlet Life Cycle 41 Chapter Portlet Concepts 73 Chapter Using Servlets and JavaServer Pages with Portlets 119 Chapter Packaging and Deployment Descriptors 159 Chapter Portal and Portlet Configuration 185 Chapter Security and Single Sign-On 209 Chapter RSS and Syndication 239 Chapter 10 Integrating the Lucene Search Engine 255 Chapter 11 Personalization and User Attributes 281 Chapter 12 Web Services for Remote Portlets (WSRP) and Application Syndication 295 Chapter 13 Exposing an Existing Application As a Portlet 307 Chapter 14 Charting with JFreeChart 339 Chapter 15 Content Management Systems 359 Index 381 www.traintelco.com iii 2840chFM.qxd 7/13/04 12:43 PM Page iv www.traintelco.com 2840chFM.qxd 7/13/04 12:43 PM Page v Contents Foreword xi About the Authors xiii About the Technical Reviewer xiv Acknowledgments xv Introduction xvii Chapter Introduction to Portals and Portlets .1 Providing a Solution with Portals Designing the Portal’s Information Architecture Portal Application Architecture Building Portlets with the Portlet API Providing Technical Solutions with Portals Security and Single Sign-On Content Syndication and RSS Searching Content from the Portal Portals and Web Services Integrating Existing Applications into the Portal Using Charts in the Portal 10 Content Management and Portlets 10 Summary 10 Chapter Portlet Basics 11 First Portlet 12 Building the Portlet Application 15 Packaging 19 Deploying 19 Running 21 Portlet Programming 101 21 GenericPortlet 21 Portlet Requests 22 Portlet Response 23 Enhancing the Portlet 25 Web.xml Deployment Descriptor 37 www.traintelco.com v 2840chFM.qxd 7/13/04 12:43 PM Page vi Contents Packaging and Deploying 38 Running 39 Summary 40 Chapter The Portlet Life Cycle 41 The Portlet Interface 41 Overview 44 Creation of the Portlet 44 Request Handling 47 Destroying the Portlet 51 Threading Issues 51 Summary 71 Chapter Portlet Concepts 73 Portlet Requests 73 Render Request 78 Action Request and File Uploading 78 Portlet Response 85 Render Response 86 Action Response 89 Portlet Context 92 Sessions 98 Sessions and Interportlet Communication 102 Content Markup Types 105 Portlet Modes 107 Window States 113 Caching 116 Style Sheets and the User Experience 116 Summary 117 Chapter Using Servlets and JavaServer Pages with Portlets 119 Portlets, Servlets, and JSP Design Goals 119 Portlet Request Dispatcher 120 Request and Response Objects 126 Session Management Between a Portlet and a Servlet or JSP 131 Creating a Form in JSP 132 Using the Portlet JSP Tag Library 132 To-Do List Portlet Example 137 vi www.traintelco.com 2840chFM.qxd 7/13/04 12:43 PM Page vii Contents The web.xml Deployment Descriptor 153 Directory Structure of the Application 153 Complete Code Listing for the To-Do List Portlet 154 Summary 158 Chapter Packaging and Deployment Descriptors 159 Portlet Application Packaging 159 Versioning 159 Portlet Application Deployment Descriptor Structure 160 Web Application Deployment Descriptor 170 XDoclet Portlet Support 171 Summary 184 Chapter Portal and Portlet Configuration 185 Using the PortalContext to Retrieve Information About the Portal 185 Using the PortletConfig Object 190 Using Portlet Preferences 195 Summary 208 Chapter Security and Single Sign-On 209 Portlet Security 210 Summary 238 Chapter RSS and Syndication 239 Overview of RSS 239 Walking Through an Example RSS File 240 RSS Browsers 246 Displaying Syndicated Information in Portlets 247 Syndicating Out 249 Summary 253 Chapter 10 Integrating the Lucene Search Engine 255 Overview of Lucene 255 Downloading and Installing Lucene 256 www.traintelco.com vii 2840chFM.qxd 7/13/04 12:43 PM Page viii Contents Lucene Concepts 256 Building an Index with Lucene 263 Designing a Portlet to Search the Index 270 Developing a Portlet for Lucene 271 Indexing Other Types of Content 277 Lucene and Different Types of Content 279 Summary 280 Chapter 11 Personalization and User Attributes 281 Making a Good Impression 281 Making Choices 289 Summary 294 Chapter 12 Web Services for Remote Portlets (WSRP) and Application Syndication 295 WSRP Overview 295 WSRP and the Java Portlet API 298 WSRP Markup in Content Fragments 299 Using WSRP 304 Common Problems with Application Syndication 304 Future Directions of WSRP 306 Summary 306 Chapter 13 Exposing an Existing Application As a Portlet 307 Overview of the YAZD Forum Software 307 Deciding What to Change 309 Displaying Screens in a Portlet 312 Getting Configuration Information 332 Issues Encountered in Our Example 338 Summary 338 Chapter 14 Charting with JFreeChart 339 Building Charts and Graphs with JFreeChart 339 Chart Types 340 Basic JFreeChart Example 343 Providing Data to the Chart 347 viii www.traintelco.com 2840ch15.qxd 7/13/04 12:44 PM Page 380 Chapter 15 0 text/html VIEW EDIT en CMS Portlet CMS CMS,WebDAV,Slide Summary In this chapter, we examined the two major standards for integrating content management systems into portlets: Java Content Repository API and WebDAV Although the JCR API is a new standard, we expect that CMS vendors will adopt the standard quickly Many client and server applications already use WebDAV We discussed the Apache Slide WebDAV client library, and then used the library in a CMS portlet Our portlet displays the content available through WebDAV, along with its size and last modification date We can browse through the folders to find a piece of content we like, and then view it inside the portlet 380 www.traintelco.com 2840chIDX.qxd 7/13/04 12:44 PM Page 381 Index Symbols and Numbers “*” or “*/*” wildcards, 106 ? (question mark) character, 338 3D bar chart, 341, 343–347 data required for, 344 example source code, 345–347 saving as PNG image, 344 3D pie chart, 354–357 A ABOUT mode, 109 absolute URLs, 60 access control, 362 access times, 100 action requests, 13–14 file uploading and, 78–84 processing of, 27, 29–30 request handling and, 13–14 setting preferences during, 197 See also processAction() method action response, 89–92 render parameter setting, 91–92 send redirect, 89–91 window state setting, 273 action URLs, 29 portlet JSP tag library and, 134–136 setting preferences using, 334–335 ActionRequest interface class, 21, 23, 29, 73, 78 ActionResponse interface class, 21, 23, 29, 89 actions processing, 29–30 triggering, 47 JSP tag, 134–136 portletMode attribute, 134–135 secure attribute, 135–136 var attribute, 135 windowState attribute, 134 Active Directory, 237–238 addChart() method, 354 addDocument() method, 266–267 addParameter() method, 50 addProperty() method, 85 addValue() method, 344 AdvancedPortlet class code listing, 34–37 doEdit() method, 27 doHelp() method, 33 analyzers, Lucene, 258 Ant build file, 174–179 creating, 174–178 running, 178–179 Apache Ant, 6, 19, 171 Apache Jetspeed, Apache Maven, 19 Apache Pluto, 1, 6, 19, 272, 284, 338, 353 Apache POI parser, 279 Apache Slide, 359, 368, 370–371 Apache Struts, 119 Apache Tomcat, 248, 335–336, 338, 368 Apache Velocity, 120 API JAR file, 175, 178 API versioning, 97 application assembler, 159 elements, 20 application syndication common problems with, 304–305 WSRP standard and, 296, 304–305 applications creating portlets from, 307–338 integrating into portals, See also portlet applications architecture application, information, 2–3 WSRP, 296–297 ArrayList object, 139–140 Atom standard, 240 attributes portlet context, 92–93 request, 73–74 tag, 273–274 session, 99 user, 281–288 authentication, 210–238 GSS-API, 224–237 JAAS, 216–223 Kerberos, 217, 218–221, 223–224 principals and, 213–214 roles and, 214 single sign-on, 215–216 types of, 211–212 usernames and, 212–213 See also security Authentication class, 229 authorization, 237–238 Authorization Contract for Containers (ACC), 238 AuthType() method, 212 B bar chart, 341, 343–347 Basic authentication, 211 boost factor, 261 branding, 304 www.traintelco.com 381 2840chIDX.qxd 7/13/04 12:44 PM Page 382 Index browsers, RSS, 246–247 BufferedReader, 275 buffering output, 87–88 build.properties file, 177–178 business semantics, 293–294 C tag, 144–145 tag, 145, 150 tag, 150 caching portlet contents, 116 callback handlers, 221–222 Callback object, 221 Cascading Style Sheets (CSS), 117, 301–303 CategoryDataset class, 344 CategoryDataset objects, 348, 349 element, 241, 243 character encoding, 88, 299 ChartDeleter class, 351, 353–354 ChartFactory class, 343, 355 charts, 10, 339–357 building, 339–340 displaying from portlets, 350–354 examples of, 343–347, 354–357 portlet extensions to, 354–356 providing data to, 347–350 saving as PNG image files, 344 source code example, 345–346 types of, 340–343 See also JFreeChart classes loading into portlets, 44 See also names of specific classes Client Certificate authentication, 211–212 close() method, 262, 267 closing indexes, 267 CMSPortlet.java class, 371, 372–375 COMMAND parameter, 140 common registry approach, 216 communication, interportlet, 102–105 concepts.war file, 77 concurrent request handling, 51–52 CONFIDENTIAL guarantee, 170 confidentiality, 232 CONFIG mode, 109 configuration information, 332–337 from JNDI, 335–337 from portlet.xml, 332–335 constructor invocation, 44–45 consumers, 298 content management systems (CMSs), 10, 359–380 integration with, 361 Java Content Repository API and, 361, 362–368 Lucene search engine and, 279–280 overview of, 359–360 problems with portals and, 361–362 WebDAV protocol and, 361, 368–380 382 content markup types, 105–107 deployment descriptor for, 107 requesting information on, 106 setting on the render response, 106–107 content repository, 364 content syndication, 7, 247–253 creating RSS streams for, 249–253 RSS Portlet display and, 247–249 content-creation tools, 360 ContentPortlet class, 104 context initialization parameters, 93–94 context path, 76–77 controller portlet, 312–316 converting applications into portlets, 307–338 See also YAZD portlet application cookies, 281 crawler class, 52–65 crawler portlet GenericPortlet class and, 65–66 implementation of, 52–70 portlet.xml file for, 64–65 private methods and, 55 threaded, 66–70 createActionURL() method, 26, 50, 77, 102 createBarChart3D() method, 344 CreateGSSContextPrivilegedAction() method, 228 createOutgoingGSSContext() class, 227 create-portlet-xml target, 175 createRenderURL() method, 77 creating portlets, 44–47 exceptions during initialization, 46–47 initializing the portlet, 45–46 invoking the constructor, 44–45 loading the classes, 44 credentials, 364, 367 CSS See Cascading Style Sheets custom portlet modes, 109–110 element, 111–112, 167–168 element, 114, 168 customer relationship management (CRM) system, 22 CyberNeko HTML parser, 278 D data set interfaces, 347–350 chart types and, 347–348 database connectivity and, 349 XML data sources and, 349–350 database connectivity, 349 Dataset interface class, 347–348 DBConnectionManager class, 336 decodeAttributeName() method, 101 decodeScope() method, 101 JSP tag, 133 element, 20 DELETE method, 370 deploying portlets, 19–21, 38–39 www.traintelco.com 2840chIDX.qxd 7/13/04 12:44 PM Page 383 Index deployment descriptors, 33–38 defining preferences in, 200 portlet application, 16, 33–37, 110–112, 152–153, 160–170 validator reference and, 206–207 web application, 16, 37–38, 153, 170–171 XDoclet generation of, 179–180, 182–184 element, 17, 112, 163, 171 destroy() method, 51, 66 destroying portlets, 51 Digest authentication, 212 digital dashboards, 10 Directory Naming Service (DNS), 237 directory structure, portlet application, 153–154 DISALLOW tokens, 55 display layout, 289–293 rules-based approaches to, 291–293 traditional approach to, 289–291 DisplayChart servlet, 352–353, 356 element, 18, 163, 171 distributed deployment, 101 Document Object Model (DOM), 251 documents, Lucene, 258 doDispatch() method, 15, 22, 30 overriding, 114 portlet mode and, 65, 67 doEdit() method, 15, 27–28, 65 portlet window states and, 114 to-do list portlet example and, 143 doGet() method, 253 doHelp() method, 15, 33, 65 portlet window states and, 114 to-do list portlet example and, 143–144 doView() method, 14–15, 65 controller portlet and, 313 crawler portlet and, 67–68 displaying portlet content with, 30–31 image display and, 32 portlet window states and, 114 to-do list portlet example and, 142 WebDAV portlets and, 372 downloading JFreeChart, 339–340 Lucene, 256 DROOLS tool, 293 Dublin Core Metadata Element Set, 3–4 E Edit All Items page, 147–150 EDIT portlet mode, 14–15, 107 requirement for, 108, 109 to-list portlet and, 147–151 EDIT_DEFAULTS mode, 109 editItemPage.jsp page, 150–151 editPage.jsp page, 147 EJBDoclet task, 174 Element Construction Set (ECS), 253 e-mail security, 209–210 encodeURL() method, 85–86 encoding, WSRP markup, 299 enterprise content management See content management systems enterprise information system (EIS), 339 Enterprise JavaBeans (EJB) classes, 172 Enumeration, 74, 94, 112, 186, 202 error.jsp file, 327 errors html.xsl file, 247 initialization, 46–47 Kerberos server, 225 validation, 208 See also exceptions ExamplePreferencesValidator class, 205 exceptions FileUploadException, 81 IllegalArgumentException, 86, 94, 197 IllegalStateException, 79, 86, 87, 89, 90, 201 IOException, 87, 123, 201 NullPointerException, 338 PortletException, 46–47 PortletModeException, 110 PortletSecurityException, 78 ReadOnlyException, 197 UnavailableException, 46–47, 271 ValidatorException, 198, 201, 205 WindowStateException, 115 See also errors EXO portal, 6, 304 element, 18, 116, 164 expression language (EL), 145 F failedKeys argument, 201 Field.Keyword() method, 260 Field object, 260–261 field searches, 259 Field.Text() method, 260 Field.Unindexed() method, 260 Field.Unstored() method, 261 file upload portlet, 81–84 file uploads action requests and, 78–84 file upload portlet and, 81–84 FileItem class, 80, 81 FileItem object, 81 FileReader, 275 FileUploadException, 81 FirstPortlet portlet, 12–15 flexibility issues, 305 flushBuffer() method, 87 tag, 145 Form-based authentication, 212 forms, creating in JSP, 132 forum software configuring, 309 installing, 308 www.traintelco.com 383 2840chIDX.qxd 7/13/04 12:44 PM Page 384 Index overview of, 307–309 See also YAZD portlet application ForumCount preference, 333, 334 fuzzy searches, 258 G Gantt chart, 342 Generic Security Services Application Program Interface See GSS-API authentication GenericPortlet abstract class, 12, 21–22, 65–66 doView() method, 15 methods for portlet modes, 108 portlet context retrieval, 92 PortletConfig interface, 190 search portlet development, 271 GenericPortlet base class, 208 getAttribute() method, 74, 99 getAttributeNames() method, 74, 99 getAttributes() method, 286 getAuthType() method, 211 getBufferSize() method, 87 getCharacterEncoding() method, 79 getConnection() method, 336 getContentLength() method, 79 getContentType() method, 79, 107 getContextPath() method, 32, 76 getCount() method, 145 getCreationTime() method, 100 getFailedKeys() method, 202 getInitParameter() method, 94, 191 getInitParameterNames() method, 94, 191 getLastAccessedTime() method, 100 getLocale() method, 77, 86 getLocales() method, 77 getMajorVersion() method, 97 getMimeType() method, 95 getMinorVersion() method, 97 getName() method, 214 getNamedDispatcher() method, 121 getNames() method, 196 getNamespace() method, 86, 88 getParameter() method, 75, 131 getParameterMap() method, 76 getParameterNames() method, 76 getParameterValues() method, 75 getPassword() method, 367 getPortalContext() method, 186 getPortalInfo() method, 188 getPortletConfig() method, 190 getPortletContext() method, 92, 190 getPortletInputStream() method, 78, 79 getPortletName() method, 195 getPortletOutputStream() method, 86 getPortletSession() methods, 98 getPreferences() method, 196 getProperty() method, 186 getReader() method, 78 getRealPath() method, 95–96 384 getRemoteUser() method, 212–213 getRequestDispatcher() method, 121 getResource() method, 95 getResourceAsStream() method, 95 getResourceBundle() method, 192 getResourcePaths() method, 95 getResponseContentType() method, 24, 106 getResponseContentTypes() method, 24, 106 getServerInfo() method, 97, 190 getSupportedPortletModes() method, 112, 188 getSupportedQueryLanguages() method, 366 getSupportedWindowStates() method, 115, 188 getTitle() method, 25, 30, 65 getUserId() method, 367 getUserPrincipal() method, 213, 216, 231 getValues() method, 196–197 getWindowState() method, 114 getWriter() method, 24, 86 graphs building, 339–340 See also charts GSS-API authentication, 209, 224–237 attributes in, 231–232 code examples for, 225–227, 229–231, 232–236 Kerberos servers and, 225 GSSContextUtil class, 227, 229, 231 GSSManager object, 228 H handshake() method, 231 hash function, 212 HelloPortlet example, 123–126 help messages, 33 help page, 151–152 HELP portlet mode, 14–15, 107 requirement for, 108 to-do list portlet and, 151–152 helpPage.jsp page, 151 HibernateDoclet task, 175 Hits object, 257, 262 homePage.jsp page, 144, 147 horizontal combined chart, 342 HREF tokens, 59–60 HTML forms, 79–80 HTML markup, 106, 300–301 HTML parser, 264 HTML tags, 362 HTMLDocument class, 264 HTMLParser class, 264 html.xsl file, 247 HTTP POST method, 79 HTTPS security, 78, 212 HttpServletRequest object, 126–129, 211 HttpServletResponse object, 129–131 www.traintelco.com 2840chIDX.qxd 7/13/04 12:44 PM Page 385 Index HttpSession object, 131–132, 354 HttpSessionBindingListener interface, 99, 354 I id attribute, 161 frame, 351 IllegalArgumentException, 86, 94, 197 IllegalStateException, 79, 86, 87, 89, 90, 201 images displaying charts as, 343, 344, 350 including in portlet content, 32–33 HTML element, 356 include() method, 121 incremental indexing, 257 index.jsp file, 327 indexes, 256–257, 263–270 adding documents, 266–267 building documents, 264–266 code example of, 267–270 creating an IndexWriter, 263 document types and, 277–279 finding content for, 264 optimizing and closing, 267 search portlet for, 270–277 See also Lucene search engine IndexHTML parser, 278 IndexSearcher class, 261–262, 280 IndexWriter adding documents with, 266–267 creating for indexes, 263 information retrieval, 255 init() method, 45–46 PortletConfig object and, 190 SearchPortlet class and, 271 threading issues and, 52, 66 initialization parameters, 190–191 context, 93–94 indexPath, 271 initializing portlets, 45–46 exceptions during, 46–47 SearchPortlet class, 271–272 element, 163–164, 191 installing Lucene search engine, 256 YAZD forum software, 308 INTEGRAL guarantee, 170 integrated development environment (IDE), integrated security, 237–238 interportlet communication, 102–105, 271 invalidate() method, 100 IOException, 87, 123, 201 isChartAvailable() method, 354 isCommitted() method, 87 isEstablished() flag, 232, 237 isMultipartContent() method, 81 isPortletModeAllowed() method, 110, 113 isReadOnly() method, 197 isSecure() method, 78 isUserInRole() method, 214, 237 isWindowStateAllowed() method, 115 element, 241–242, 244 item interface, 365 J JAAS See Java Authentication and Authorization Services jaasLogin() method, 221 Jakarta Apache Lucene See Lucene search engine Jakarta Commons File Upload library, 80–81 Jakarta Commons HTTP client library, 371 Jakarta Commons logging libraries, 371 Jakarta Commons Standard Tag Library, 371 Jakarta Element Construction Set, 253 JAR (Java Archive) files, 159 Java portlet API, 175 JFreeChart, 339–340 Java Enterprise Edition (J2EE), 6, 119, 335 Java Authentication and Authorization Services (JAAS), 209, 216–223 Kerberos authentication and, 217–221 Java Authorization Contract for Containers (ACC), 238 Java Community Process (JCP), 2, 238, 293 Java Content Repository API (JCR API), 361, 362–368 concepts related to, 364–367 development with, 367–368 overview of, 362–364 search support, 366–367 Java Content Repository Query Language (with SSES), 366 Java Database Connectivity (JDBC), 349 Java GSS-API authentication, 224–237 java.io.File class, 264 java.io.tmpdir system property, 81 java.lang.Object, 73 Java Name Directory Interface (JNDI), 237, 335–337 Java Portlet API, building portlets with, WSRP standard and, 298–299 java.security.Principal interface, 214 Java SOAP toolkit, Java Specification Request (JSR), JSR 94 standard, 293 JSR 168 standard, 1, 2, 11 JSR 170 standard, 362–363 Java Standard Tag Library (JSTL), 144, 145, 371, 378 JavaCC parser, 278 JavaDoc tags, 172, 181–182 JavaScript CMS content and, 362 portlets and, 88–89 www.traintelco.com 385 2840chIDX.qxd 7/13/04 12:44 PM Page 386 Index JavaServer Faces (JSF), 6, 119 JavaServer Pages (JSP), 5, 11 controller portlets and, 312–316 form creation in, 132 handling exceptions thrown by, 123 HttpServletRequest object and, 126–129 HttpServletResponse object and, 129–131 including in responses, 97 Java Standard Tag Library and, 144, 371, 378 portlet request dispatcher and, 120–126 portlet tag library and, 132–137 reducing number of, 327 reusing, 120 RSS stream creation with, 249–250 session management with portlets and, 131–132 to-do list portlet example and, 137–158 javax.portlet.keywords key, 193 javax.portlet package, 6, 12, 120 javax.portlet prefix, 23 javax.portlet.short-title key, 193 javax.portlet.title key, 193 JCR API See Java Content Repository API JCRQL (with SSES), 366 Jess library, 293 JFreeChart, 10, 339–357 building charts with, 339–340 data set interfaces in, 347–350 database connectivity from, 349 demo application included with, 340 displaying charts from portlets in, 350–354 examples of using, 343–347, 354–357 portlet extensions to, 354–356 saving charts as image files, 344 servlets and, 351–354 source code example, 345–346 types of charts included with, 340–343 XML data sources and, 349–350 JNDI (Java Name Directory Interface), 237, 335–337 JPedal utility, 279 JPEG image files, 343, 350 JSP See JavaServer Pages JSR See Java Specification Request JSTL See Java Standard Tag Library JTidy utility, 278 K Kerberos v5 protocol, 217, 223–224 authentication process, 223–224 GSS-API and, 225 JAAS login in, 218–221 terminology used by, 220–221 Key Distribution Center (KDC), 220 key value pairs, 281 element, 34, 166 386 L life cycle of portlets, 44–71 creating the portlet, 44–47 destroying the portlet, 51 request handling, 47–50 threading issues, 51–70 Lightweight Directory Access Protocol (LDAP), 237, 285 limitPieDataset() method, 355 element, 244 link rewriting, 362 link-building tag, 320–326 link-rewriting tag, 317–320 list() method, 370 listBasic() method, 370–371 ListFiles.jsp file, 377–380 listWebdavResources() method, 371 load balancing, 305 locale encoding, 88 locks, Lucene, 272 log() methods, 96 logging, portlet, 96 login information, 281, 289 login() method, 367 login modules, 217–218 LoginContext object, 222 LoopTagStatus object, 145 Lucene search engine, 255–280 analyzers, 258 boost factor, 261 concepts related to, 256–263 content management, 279–280 demo classes, 264 documents, 258 downloading and installing, 256 fields, 260–261 file types and, 277–279 Hits object, 262 index creation in, 256–257, 263–270 IndexSearcher class, 261–262 locks used in, 272 overview of, 255–256 queries, 257, 258–259 search portlet, 270–277 stemming process, 263 tag library, 273 terms, 259 M MANIFEST.MF file, 159–160 man-in-the-middle attacks, 211 markup content markup types, 105–107 WSRP markup in content fragments, 299–303 Markup web service, 297 MAXIMIZED window state, 113 MD5 algorithm, 212 message digest, 212 tags, www.traintelco.com 2840chIDX.qxd 7/13/04 12:44 PM Page 387 Index metadata identifying for portal content, 3–4 resource bundle of, 192–195 methods private, 55 WebDAV, 368–370 See also names of specific methods Microsoft Active Directory, 237–238 Microsoft NTLM, 238 MIME types, 79 determining, 95 portlet modes and, 107, 164 element, 19, 111 MINIMIZED window state, 113–114 mixing node types, 365 MKCOL method, 369 modes See portlet modes Multipurpose Internet Mail Extensions See MIME types MultiSearcher class, 280 MySQL database, 308 N element, 112 named dispatcher, 122 names defining for portlets, 195 retrieving server names, 77 namespace encoding, 299 JSP tag, 136–137 Neko HTML parser, 278 NetNewsWire Lite, 246 nodes, 365, 367–368 NORMAL window state, 113 NullPointerException, 338 Nutch project, 256 O OASIS (Organization for the Advancement of Structured Information Standards), 9, 295 object identifier (Oid), 228 open source parsers, 278–279 OpenLDAP Foundation, 237 openURL() method, 375 operators, search, 259 optimizing indexes, 267 OverLIB JavaScript library, 344 P packaging portlets, 19, 38–39, 159 pageregistry.xml file, 20, 38 JSP tag, 133 parameters initialization, 93–94, 190–191 render, 91–92 request, 75–76 parse() method, 258 parseRequest() method, 81 parsers HTML, 264 open source, 278–279 paths, 366 PDF to HTML utility, 279 PDFBox utility, 278 personalization, 281–294 application syndication and, 305 content management systems and, 360 display layout and, 289–293 rules-based programming and, 291–293 user attributes and, 281–288 pie chart, 341, 354–357 PieDataset object, 349, 354 Platform for Privacy Preferences (P3P), 282 PlotOrientation object, 344 Pluggable Authentication Modules (PAM), 217 Pluto See Apache Pluto PNG image files, 343, 344, 350 POI parser, 279 port number retrieval, 77 portal containers, 116 portalbook.com web site, 10 PortalContext object, 112, 185–189 retrieving portal information with, 185–189 WSRP standard and, 299 portals application architecture for, charts used in, 10 CMS integration with, 361–362 content syndication for, defined, 11 displaying information about, 188–189 identifying content for, information architecture for, 2–3 integrating existing applications into, metadata for content of, 3–4 portlet modes and, 188 properties of, 186–187 retrieving information about, 185–189 RSS feeds and, 3, search engine for, 5, 7–8, 255–280 security for, Single Sign-On for, solutions provided by, 1–2, style sheets and, 116–117 user interface for, 4–5, 117 web services and, 8–9 window states of, 188 Porter Stemming Algorithm, 263 portlet API versioning, 97 portlet application deployment descriptor, 16, 33–37, 160–170 element, 167–168 element, 168 element, 161–167 portlet modes and, 110–112 element, 160–161 www.traintelco.com 387 2840chIDX.qxd 7/13/04 12:44 PM Page 388 Index resource bundle test portlet and, 194–195 element, 169–170 to-do list portlet example and, 152–153 element, 168–169 validator reference and, 206–207 XDoclet generation of, 179–180, 182–184 portlet applications building, 15–19 defined, 11 deploying, 19–21, 38–39 deployment descriptor structure, 160–171 directory structure, 153–154 existing applications as, 307–338 packaging, 19, 38–39, 159 running, 21, 39 versioning, 159–160 web.xml deployment descriptor, 170–171 XDoclet support, 171–184 portlet containers accessing information about, 97 defined, 11 portlet context, 92–97 API versioning, 97 attributes, 92–93 container information, 97 initialization parameters, 93–94 JSP inclusion, 97 logging, 96 MIME types, 94–96 resource access, 94–96 retrieving, 92 servlet inclusion, 97 element, 17, 20, 161–167 portlet.expiration-cache property, 85 Portlet interface, 12, 41–43 portlet logging, 96 Portlet Management web service, 297 portlet modes, 14–15, 107–113 changing, 110 custom modes, 109–110 deployment descriptor for, 110–112 GenericPortlet method and, 108 getting supported modes, 112–113 MIME types and, 107, 164 portals and, 188 required modes, 108–109 retrieving from requests, 107–108 Portlet Open Source Trading (POST), 247 @portlet.portlet tag, 172–174, 181 @portlet.portlet-info tag, 181 @portlet.portlet-init-param tag, 181 @portlet.preference tag, 181 portlet preferences, 195–208 benefits of using, 333 deployment descriptor and, 200 examples of, 198–200, 202–208 retrieving, 196–197 388 setting and removing, 197–198 validation of, 201–208 @portlet.preferences-validator tag, 181 portlet request dispatcher, 120–126 exception handling and, 123 named dispatcher and, 122 portlet content and, 123 servlet example using, 123–126 portlet requests, 73–84 action requests, 78–80 context path, 76–77 file uploads, 80–84 HTTPS security, 78 internationalization, 77 preferred locales, 77 render requests, 78 request attributes, 73–74 request parameters, 75–76 request properties, 75 request security, 78 scheme, server name, and port retrieval, 77 portlet response, 23–24, 85–86 properties, 85 URL encoding, 85–86 @portlet.security-role-ref tag, 181 portlet sessions, 98–105 access times, 100 creation of, 100 distributed deployment issues, 101 interportlet communication and, 102–105 invalidation of, 100 session timeout, 100 threading issues, 101 utility class, 101 @portlet.supports tag, 181 portlet tag library, 132–137 JSP tag, 134–136 JSP tag, 133 JSP tag, 136–137 JSP tag, 133 JSP tag, 136 portlet URLs, 26–27, 300, 312 portlet.xml deployment descriptor, 16, 33–37 configuration information and, 332–335 crawler portlet and, 64–65 portlet modes and, 110–112 resource bundle test portlet and, 194–195 structure of, 160–170 to-do list portlet and, 152–153 validator reference and, 206–207 XDoclet generation of, 179–180, 182–184 tag, 145, 150 portlet-app_1_0.xsd XML Schema, 160 element, 17, 111, 160–161 element, 18, 163 www.traintelco.com 2840chIDX.qxd 7/13/04 12:44 PM Page 389 Index PortletConfig interface, 185, 190 PortletConfig object, 92, 190–195 PortletContext object, 92–93, 120 portletCounter variable, 44 PortletDiskFileUpload class, 81 PortletDoclet task, 175 portletentityregistry.xml file, 20 PortletException, 46–47 element, 25, 34, 165–166, 192 element, 19, 111 portletMode attribute, 134–135 PortletModeException, 110 element, 17–18, 163, 195 element, 166 PortletPreferences object, 196, 197, 202 tag, 148 PortletRequest interface class, 21, 23, 32, 73, 212 PortletRequest object, 186, 196 PortletRequest.USER_INFO key, 281 PortletRequestDispatcher object, 120–121 PortletResponse interface class, 21, 23, 85–86 portlets action requests and, 13–14, 22, 27, 29 building with portlet API, caching contents of, 116 charts displayed from, 350–354 communication between, 102–105 concepts related to, 73–118 content management and, 10, 359–380 context for, 92–97 controller, 312–316 converting applications into, 307–338 creating, 44–47 defined, 11 deploying, 19–21, 38–39 deployment descriptors for, 16, 33–38 destroying, 51 displaying content of, 30–31 enhancing, 25–37 file upload, 81–84 GenericPortlet class, 21–22 help messages in, 33 images included in, 32–33 initialization of, 45–46 initialization parameters for, 93–94, 190–191 interface example, 41–43 invoking the constructor for, 44–45 JavaScript and, 88–89 life cycle of, 44–71 loading classes into, 44 logging by, 96 markup types for, 105–107 metadata associated with, 192–195 modes for, 14–15, 107–113, 188 name definition for, 195 packaging, 19, 38–39, 159 personalization of, 281–294 pointing forms to, 28–29 preferences for, 195–208 processing actions in, 29–30 programming basics, 21 render requests and, 14, 22–23, 47 request handling by, 13–14, 22–23, 47–50, 73–84 resource bundles and, 192–195 response objects for, 23–24, 85–86 running, 21, 39 search, 270–277 security of, 210–238 servlets included in, 123–126 session tracking for, 98–105 style sheets and, 116–117 threading issues for, 51–70 titles for, 25–26, 30 to-do list example, 137–158 URLs for, 26–27 WebDAV, 371–380 window states, 113–115 XDoclet tags for, 172–174, 180–181 PortletSecurityException, 78 PortletSession object, 98, 131 PortletSessionUtility class, 101 PortletURL objects, 26, 132 PortletUtilities class, 354, 356 subtask, 175 portlet_xml.xdt template, 175 post.jsp file, 328 POST method, 132, 150 PostgreSQL database system, 308 preferences See portlet preferences element, 166 PreferencesValidator interface, 201, 205 PreferencesValidator object, 197 PreferencesValidatorPortlet class, 202 preferred locales, 77 PreferredDatabase preference, 200 PREVIEW mode, 109 Principal object, 213, 216, 222, 231 principals, 213–214 PRINT mode, 109–110 PrintWriter object, 86 private methods, 55 PrivilegedAction class, 227 processAction() method, 14 action requests and, 22, 27, 29–30 concurrent requests and, 51–52 exception thrown from, 65–66 file upload portlet and, 81–84 interportlet communication and, 102, 104 portlet preferences and, 196, 202 query processing and, 273 request handling and, 14, 47–50 send redirect and, 90 to-do list portlet example and, 140–142 WebDAV portlets and, 372 See also action requests producers, 297–298 www.traintelco.com 389 2840chIDX.qxd 7/13/04 12:44 PM Page 390 Index properties JCR API, 365–366 portal, 186–187 request, 75 response, 85 PROPFIND method, 369 PROPPATCH method, 369 proxy SSO, 215–216 PUT method, 370 Q queries, 257 JCR API, 366–367 processing, 273 types of, 258–259 QueryParser class, 258 question mark (?) character, 338 R ReadOnlyException, 197 redirect portlet, 89–91 registerChartForDeletion() method, 354 Registration web service, 297 Remote Method Invocation (RMI), 90, 231 removeAttribute() method, 74, 99 render() method, 14, 78, 120 concurrent requests and, 51–52 doDispatch method() and, 65, 67 preferences validation and, 202 render parameters and, 91 RenderRequest object and, 22–23 request handling and, 14, 47–50, 78 search form display and, 272–273 title setting and, 30 render parameters, 91–92 render requests, 14, 47, 78 render response, 86–89 buffering output, 87–88 JavaScript and, 88–89 locale and character encoding, 88 setting the content type on, 106–107 writing content, 86–87 RenderRequest interface class, 21 RenderResponse interface class, 21, 23 RenderResponse object, 86, 129 JSP tag, 136 repository, 364, 367 request attributes, 73–74 request dispatcher See portlet request dispatcher Request for Comments (RFC) documents, 224 request handling, 13–14, 22–23, 47–50, 73–84 action requests, 13–14, 22, 27, 29, 78–80 concurrent requests, 51–52 context path, 76–77 HTTPS security, 78 internationalization, 77 390 port retrieval, 77 preferred locales, 77 render requests, 14, 22–23, 47, 78 request attributes, 73–74 request parameters, 75–76 request properties, 75 request security, 78 scheme retrieval, 77 server name retrieval, 77 request properties, 75 request security, 78 required portlet modes, 108–109 reset() method, 88, 197 resetBuffer() method, 88 Resource Description Framework (RDF) format, 4, 239 element, 25, 192 resources, accessing, 94–96 response objects, 23–24, 85–86 action response, 89–92 properties, 85 render response, 86–89 URL encoding, 85–86 review process, 360 RFC documents, 224 roles, 214 RSS4J library, 251–253 RSS Portlet, 247–249 RSS standards, 3, 7, 239–253 browsers based on, 246–247 overview of, 239–240 RSS Portlet display and, 247–249 syndicating out using, 249–253 version examples, 240–246 RSS version 0.9 example, 240–242 RSS version 1.9 example, 242–244 RSS version 2.0 example, 244–246 RSS Viewer, 246–247, 251, 253 RssChannel object, 253 RssChannelItem object, 253 RSS-DEV working group, 239 RssDocument object, 253 rules-based programming, 291–293 run() method, 54, 228 Runnable interface, 52, 53 running portlets, 21, 39 S Sandia National Laboratories, 293 saveChartAsJPEG() method, 351 saveChartAsPNG() method, 344, 351, 354 scheme retrieval, 77 scope, portlet session, 99 screen simplification, 327–332 search engines, 5, 7–8, 255–280 content management systems and, 279–280, 360 JCR API search support and, 366–367 See also Lucene search engine search() method, 262 www.traintelco.com 2840chIDX.qxd 7/13/04 12:44 PM Page 391 Index search operators, 259 search portlet, 270–277 code example, 275–277 contents display, 275 initializing, 271–272 query processing, 273 results display, 273–274 search form display, 272–273 tag, 273 SearchForm.jsp, 275 searching content from portals, 7–8 JCR API query languages and, 366–367 Lucene query types and, 258–259 SearchPortlet class, 275–277 SearchResults.jsp, 274, 275 secure attribute, 135–136 Secure Sockets Layer (SSL), 212 security, 209–238 authentication, 211–213 GSS-API, 224–237 HTTPS, 78, 212 integrated, 237–238 JAAS, 216–223 Kerberos, 217, 218–221, 223–224 portal, portlet, 210–238 principals and, 213–214 request, 78 roles and, 214 servlet, 211–214 single sign-on, 215–216 usernames and, 212–213 Security Assertions Markup Language (SAML), 238 element, 169–170 element, 171 element, 167, 171, 214 sendRedirect() method, 89–91 sendTempFile() method, 352, 353 server name retrieval, 77 Service Description web service, 297 service() method, 353 ServletContext object, 92, 93 element, 122 servlets content returned by, 123 handling exceptions thrown by, 123 HttpServletRequest object and, 126–129 HttpServletResponse object and, 129–131 including in responses, 97 JFreeChart and, 351–354 portlet request dispatcher and, 120–126 request parameters/attributes and, 131 RSS generation with, 251 security of, 211–214 session management with portlets and, 131–132 similarity of portlets and, 11, 13 ServletUtilities class, 351–352, 354 SessionPortlet class, 172–173 sessions See portlet sessions setAttribute() method, 74, 99, 131 setBoost() method, 261 setBufferSize() method, 87 setCharacterEncoding() method, 79 setContentType() method, 24, 107 setKerberosSystemProperties() method, 220 setMaxInactiveInterval() method, 100 setParameter() method, 26, 29 setParameters() method, 26, 29 setPortletMode() method, 110 setProperty() method, 85 setRenderParameter() method, 91 setRenderParameters() method, 91–92 setSecure() method, 26–27, 78 setSizeMax() method, 81 setSizeThreshold() method, 81 setTitle() method, 25–26 setValue() method, 354 setWindowState() method, 115, 273 element, 34, 166 Simple API for XML (SAX), 350 Simple Object Access Protocol (SOAP), 8, 296 Simple Text Extractor Library, 279 Single Sign-On (SSO), 7, 215–216 application syndication and, 305 CMS integration with portals and, 361–362 common registry approach, 216 proxy SSO, 215–216 send redirect, 90 true SSO, 215 Slide See Apache Slide SOAP (Simple Object Access Protocol), 8, 296 soft links, 365 SSL (Secure Sockets Layer), 212 SSO See Single Sign-On stemming, 263 stopCrawler() method, 52 store() method, 197–198, 201, 202, 334 String arrays, 196, 197 String constants, 64 String objects portal properties and, 186 portlet parameters and, 23, 75, 91, 191 portlet preferences and, 196, 197 String value, 73 style sheets user experience and, 116–117 See also Cascading Style Sheets Subject.doAs() method, 227 supported window states, 115 element, 34, 165 element, 18, 110–112, 164–165 Swing applications, 340, 343 synchronized keyword, 62 www.traintelco.com 391 2840chIDX.qxd 7/13/04 12:44 PM Page 392 Index syndication, 247–253 application, 296, 304–305 creating RSS streams for, 249–253 RSS Portlet display and, 247–249 See also RSS standards T tag library building, 316–326 Java Standard, 144 Lucene JSP, 273 portlet, 132–137 Tag Library Descriptor (TLD) file, 144 tags HTML, 300–301 link-building, 320–326 link-rewriting, 317–320 XDoclet, 172–174, 180–181 See also names of specific tags element, 175 Term object, 259 Thread object, 53–54 threaded crawler portlet, 66–70 code listing for, 68–70 implementation of, 66–68 threading issues, 51–70 concurrent requests and, 51–52 crawler class and, 52–65 GenericPortlet class and, 65–66 portlet sessions and, 101 private methods and, 55 threaded crawler portlet and, 66–70 thread-safe crawler, 52–70 3D bar chart, 341, 343–347 3D pie chart, 354–357 tickets, 364, 367 element, 166, 244 titles, portlet, 25–26, 30, 166 TLD (Tag Library Descriptor) file, 144 to-do list portlet example, 137–158 action request handling, 140–142 complete code listing, 154–158 directory structure, 153–154 display methods, 142–144 editing all items, 147–151 editing individual items, 150–151 help page, 151–152 items display, 144–147 Java Standard Tag Library and, 144 portlet.xml deployment descriptor, 152–153 ToDoItemBean class, 138–139 ToDoListPortlet class, 139–144 web.xml deployment descriptor, 153 tokens DISALLOW, 55 HREF, 59–60 Tomcat application server, 248, 335–336, 338, 368 392 toolbar.jsp file, 328 TopicPortlet class, 102 toString() method, 222 traditional display layout, 289–291 element, 170 true SSO, 215 try catch block, 202 U UnavailableException, 46–47, 271 URLs absolute, 60 action, 29 encoding, 85–86 forbidden, 55 portlet, 26–27 user attributes, 281–293 accessing, 285–288 display output and, 289–293 identifying, 281–282 problems with, 284–285, 289 types of, 282–284 user identification, 212–213 user interface common terminology for, 117 designing for portals, 4–5, 117 element, 168–169, 287 UserLand Software, 239 username, 212–213 V validate() method, 201 validating preferences, 201–208 ValidatorException, 198, 201, 205 valueUnbound() method, 354 var attribute, 135, 331 version data, portlet API, 97 versioning portlet applications, 159–160 vertical 3D bar chart, 341 view.jsp file, 328 VIEW portlet mode, 14–15, 32, 65, 107 requirement for, 108, 109 to-do list portlet and, 145, 147 viewForum.jsp file, 328 viewThread.jsp file, 328 W WAR (web application archive) files, 6, 15, 159, 184 web application deployment descriptor, 16, 37–38, 170–171 web applications creating portlets from, 307–338 integrating into portals, See also portlet applications web crawlers, 256 Web Service Definition Language (WSDL), 296 www.traintelco.com 2840chIDX.qxd 7/13/04 12:44 PM Page 393 Index web services, 8–9, 297–298 consumers and, 298 portal architecture and, producers and, 297–298 Web Services for Remote Portlets (WSRP) standard, 9, 247, 295–306 application syndication and, 296, 304–305 architecture of, 296–297 cascading style sheets and, 301–303 character encoding and, 299 consumers and, 298 future directions for, 306 HTML tags and, 300–301 Java Portlet API and, 298–299 markup in content fragments, 299–303 namespace encoding and, 299 overview of, 295–298 portlet URLs and, 300 producers and, 297–298 support for using, 304 user attributes and, 282 WSRP portlets and, 298 web sites created by authors, 10 JFreeChart, 339 Lucene search engine, 256 Portlet Open Source Trading, 247 YAZD forum software, 307 web.xml deployment descriptor, 16, 37–38 portlet applications and, 170–171 to-do list portlet and, 153 WebDAV portlet, 371–380 CMSPortlet class, 372–375 ListFiles.jsp file, 377–380 WebDAVHelper class, 375–377 WebDAV protocol, 361, 368–380 client library, 370–371 compatible applications, 368 methods, 368–370 overview of, 368 portlet creation, 371–380 WebDAVHelper.java class, 371, 375–377 WebdavResource object, 370 WebDoclet task, 174 WEB-INF directory, 16, 153 WebPagePortlet class, 275 WelcomeScreen preference, 200 wildcard searches, 258 wildcard signifiers, 106 window states, 113–115, 188 custom, 114 main types of, 113–114 processing content for, 114 setting, 115 supported, 115 windowState attribute, 134 WindowState object, 114 WindowStateException, 115 workflow process, 360 workspaces, 365 World Wide Web Consortium (W3C), 239 write() method, 81 writing content, 86–87 WSRP See Web Services for Remote Portlets (WSRP) standard X Xalan JAR files, 248 XDoclet code-generation tool, 171–184 creating the Ant build file, 174–178 example of using, 181–184 generated portlet.xml deployment descriptor, 179–180, 182–184 portlet.xml template file, 175 running the Ant build file, 178–179 tags for portlets, 172–174, 180–181 XML data sets, 349–350 XML Schema location, 180 XML tags, 362 XPath query language, 366 XPDF tool, 278 XY chart, 341 XY scatter plot, 342 Y YAZD portlet application, 307–338 configuration issues and, 309 control issues and, 309–312 controller portlet and, 312–316 deciding on changes for, 309–312 getting configuration information, 332–337 installing forum software for, 308 link rendering and, 312 problems encountered in, 338 simplifying screens in, 327–332 tag library and, 316–326 www.traintelco.com 393 BOB_Forums_7x9.25.qxd 8/18/03 forums.apress.com FOR PROFESSIONALS BY PROFESSIONALS™ JOIN THE APRESS FORUMS AND BE PART OF OUR COMMUNITY You’ll find discussions that cover topics of interest to IT professionals, programmers, and enthusiasts just like you If you post a query to one of our forums, you can expect that some of the best minds in the business—especially Apress authors, who all write with The Expert’s Voice™—will chime in to help you Why not aim to become one of our most valuable participants (MVPs) and win cool stuff? Here’s a sampling of what you’ll find: DATABASES PROGRAMMING/BUSINESS Data drives everything Share information, exchange ideas, and discuss any database programming or administration issues Unfortunately, it is Talk about the Apress line of books that cover software methodology, best practices, and how programmers interact with the “suits.” INTERNET TECHNOLOGIES AND NETWORKING WEB DEVELOPMENT/DESIGN Try living without plumbing (and eventually IPv6) Talk about networking topics including protocols, design, administration, wireless, wired, storage, backup, certifications, trends, and new technologies Ugly doesn’t cut it anymore, and CGI is absurd Help is in sight for your site Find design solutions for your projects and get ideas for building an interactive Web site JAVA SECURITY We’ve come a long way from the old Oak tree Hang out and discuss Java in whatever flavor you choose: J2SE, J2EE, J2ME, Jakarta, and so on Lots of bad guys out there—the good guys need help Discuss computer and network security issues here Just don’t let anyone else know the answers! MAC OS X TECHNOLOGY IN ACTION All about the Zen of OS X OS X is both the present and the future for Mac apps Make suggestions, offer up ideas, or boast about your new hardware Cool things Fun things It’s after hours It’s time to play Whether you’re into LEGO® MINDSTORMS™ or turning an old PC into a DVR, this is where technology turns into fun OPEN SOURCE WINDOWS Source code is good; understanding (open) source is better Discuss open source technologies and related topics such as PHP, MySQL, Linux, Perl, Apache, Python, and more No defenestration here Ask questions about all aspects of Windows programming, get help on Microsoft technologies covered in Apress books, or provide feedback on any Apress Windows book HOW TO PARTICIPATE: Go to the Apress Forums site at http://forums.apress.com/ Click the New User link www.traintelco.com

Ngày đăng: 12/10/2016, 13:11

Từ khóa liên quan

Mục lục

  • Prelims

  • Contents at a Glance

  • Contents

    • Chapter 1 Introduction to Portals and Portlets

    • Chapter 2 Portlet Basics

    • Chapter 3 The Portlet Life Cycle

    • Chapter 4 Portlet Concepts

    • Chapter 5 Using Servlets and JavaServer Pages with Portlets

    • Chapter 6 Packaging and Deployment Descriptors

    • Chapter 7 Portal and Portlet Configuration

    • Chapter 8 Security and Single Sign-On

    • Chapter 9 RSS and Syndication

    • Chapter 10 Integrating the Lucene Search Engine

    • Chapter 11 Personalization and User Attributes

    • Chapter 12 Web Services for Remote Portlets (WSRP) and Application Syndication

    • Chapter 13 Exposing an Existing Application As a Portlet

    • Chapter 14 Charting with JFreeChart

    • Chapter 15 Content Management Systems

    • Index

    • Foreword

    • About the Authors

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan