Linux for Websphere and DB2 Servers

Linux for Websphere and DB2 Servers

Linux for WebSphere and DB2 Servers Jakob Carstensen, Herman Chen, Doug Marker, Dan Cornell, Paul Zikopoulos International Technical Support Organization www.redbooks.ibm.com SG24-5850-00 SG24-5850-00 International Technical Support Organization Linux for WebSphere and DB2 Servers October 1999 Take Note! Before using this information and the product it supports, be sure to read the general information in Appendix B, “Special notices” on page 275. First Edition (October 1999) This edition applies to the following products: • WebSphere Application Server 2.0.3 • DB2 Universal Database 6.1 • VisualAge for Java 3.0 (technical evaluation) •IBMHTTPServer • Apache Web Server 1.3.6 • IBM Java JDK 1.16 • Blackdown JDK 1.17 V.3 • Caldera OpenLinux 2.2 and 2.3 • Red Hat Linux 6.0 • SuSE Linux 6.1 • TurboLinux 3.6 Note This book is based on a pre-GA version of a product and may not apply when the product becomes generally available. We recommend that you consult the product documentation or follow-on versions of this redbook for more current information. Comments may be addressed to: IBM Corporation, International Technical Support Organization Dept. HZ8 Building 678 P.O. Box 12195 Research Triangle Park, NC 27709-2195 When you send information to IBM, you grant IBM a non-exclusive right to use or distribute the information in any way it believes appropriate without incurring any obligation to you. © Copyright International Business Machines Corporation 1999. All rights reserved. Note to U.S Government Users – Documentation related to restricted rights – Use, duplication or disclosure is subject to restrictions set forth in GSA ADP Schedule Contract with IBM Corp. Contents Preface....................................................ix The team that wrote this redbook. ...................................x Commentswelcome............................................. xii Part 1. Introduction .....................................................1 Chapter 1. The Linux operating system .........................3 1.1CommercializingLinux.....................................3 1.2BestthingsontheInternetarefree?..........................4 1.3 Linux performance, stability, and security .......................5 1.4Easeofuse.............................................5 1.4.1Summary...........................................7 Chapter 2. IBM’s commitment to Linux ..........................9 Chapter 3. The IBM Application Framework for e-business.........11 3.1 e-business: merging the Internet and IBM technology . ...........11 3.2 Foundations of the IBM Application Framework for e-business. .....12 3.3Javaeverywhere........................................13 3.4 Connectors are bridges between networks .....................14 3.4.1 Some key reasons for using connectors . ................15 3.5 Service modules in the Application Framework for e-business . .....16 3.5.1Thee-businessapplicationservices......................17 3.5.2 The Web application programming model using IBM software . 17 3.5.3Summary..........................................18 Chapter 4. WebSphere, VisualAge for Java and DB2 ..............19 4.1 Foundation of the IBM Application Framework for e-business . .....19 4.2VisualAgeforJava.......................................20 4.2.1 Methods of delivery . .................................20 4.3 IBM WebSphere Application Server ..........................21 4.4 DB2 Universal Database- the foundation for e-business ...........22 Chapter 5. Hardware and software setup .......................23 5.1Initialsetupguidelines....................................24 5.1.1 Recommended install sequence checklist. ................25 5.2Hardwaresetup.........................................25 5.2.1 Netfinity 3000 . ......................................26 5.2.2 Netfinity 5000 . ......................................26 5.3LabLANsetups.........................................26 5.4Linux-installationandconfiguration.........................28 © Copyright IBM Corp. 1999 iii 5.4.1 Installing Linux ......................................28 5.4.2 Graphics adapter setup ...............................29 5.5 Product installation preparation . ...........................30 5.6Java-Installationandconfiguration..........................30 5.6.1Javainstallsteps....................................31 5.6.2Javatestingandsetup................................31 5.7Apache-installationandconfiguration........................32 5.7.1IBMHTTPServerinstallsteps..........................33 5.7.2TestingApache.....................................34 5.7.3SettingupIBMHTTPServerstartupscript.................35 5.7.4 Getting IBM HTTP Server (apachectl) to start at boot time .....36 5.7.5DetectingApacheproblems............................38 5.8 Installing and configuring DB2 Universal Database . ...........39 5.9 Before you begin . ......................................39 5.9.1 Caldera OpenLinux Version 2.2 or Version 2.3 . ...........40 5.9.2RedHatLinuxVersion5.2orVersion6.0..................42 5.9.3 TurboLinux Version 3.6................................42 5.9.4SuSELinuxVersion6.1...............................42 5.10Performingtheinstallation................................43 5.10.1Verifyingtheinstallation..............................47 5.11 Deinstalling DB2 Universal Database . ......................48 5.11.1Step1.StopandremovetheAdministrationServer.........48 5.11.2Step2.Stopandremoveanyinstances..................49 5.11.3Step2.DeinstallDB2................................50 5.12 WebSphere Application Server - installation and configuration .....51 5.12.1 WebSphere install steps . ...........................52 5.13VisualAgeforJavaforLinux-installationandconfiguration.......58 Part 2. Programming model ..............................................61 Chapter 6. Web programming model...........................63 6.1OverviewofJavaservlets..................................63 6.1.1 Advantages of servlets ................................64 6.2StructureoftheJavaservlets...............................66 6.2.1Interfacejavax.servlet.Servlet...........................67 6.2.2Interfacejavax.servlet.ServletConfig.....................67 6.2.3Interfacejavax.servlet.ServletContext.....................68 6.2.4 Interface javax.servlet.ServletRequest ....................68 6.2.5 Interface javax.servlet.ServletResponse. ................69 6.2.6 Interface javax.servlet.http.HttpServletRequest . ...........69 6.2.7 Interface javax.servlet.http.HttpServletResponse . ...........69 6.2.8 javax.servlet.GenericServlet . ...........................70 6.2.9 Class javax.servlet.ServletInputStream....................70 iv Linux for WebSphere and DB2 Servers 6.2.10Classjavax.servlet.ServletOutputStream.................70 6.2.11Classjavax.servlet.http.HttpServlet.....................71 6.2.12Classjavax.servlet.http.HttpUtils.......................71 6.2.13Exceptionjavax.servlet.ServletException.................72 6.2.14Exceptionjavax.servlet.UnavailableException.............72 6.3JavaServletsDevelopmentKitfromSun......................72 6.4 WebSphere Application Server Servlets API extensions...........72 6.5ServletswithJSPs.......................................74 6.5.1JavaServerPage(JSP)Overview........................74 6.5.2 Advantages of JSP . .................................75 6.5.3JavaServerPageSpecification..........................75 6.5.4HTMLtemplatesyntaxforvariabledata...................79 6.5.5JavaServerPageAPI.................................84 6.5.6 Preventing Web page caching ..........................85 Chapter 7. Servlet programming model ........................89 7.1IssueswithCGIscriptsandWebserverAPIextension............89 7.2CGIscripts,APIextensionsandservlets-lifecycles.............90 7.2.1CGIscripts-lifecycle.................................91 7.2.2APIextension-lifecycle..............................91 7.2.3Summaryofaservlet.................................92 7.2.4Servletlifecycle.....................................93 7.3EnvironmentvariablesinCGIversusServlets..................95 7.4 Servlet threading - reentrancy of servlets ......................97 7.5 Programming WebSphere’s servlet API extensions . ...........98 7.5.1 DB connection pooling...............................101 7.5.2 Session management ................................105 7.6 Servlet programmming under a microscope ...................108 7.6.1 Using GenericServlet class versus HttpServlet class ........108 7.6.2GET/POSTprocessinginservlets......................108 7.6.3 The init(), service(), and destroy() methods ...............112 7.6.4Parameterspassedbytheserver.......................116 7.7MigratingfromaCGIbasetoservlets.......................117 7.7.1Migration-decisionscriteria...........................117 7.7.2 Migration - an approach ..............................118 Part 3. WebSphere and design patterns for e-commerce......................119 Chapter 8. WebSphere Application Server technology ...........121 8.1 WebSphere Application Server security . .....................121 8.1.1 WebSphere Application Server security management........122 8.1.2Realms...........................................125 8.1.3Users............................................129 v 8.1.4 Groups ...........................................137 8.1.5Accesscontrollists..................................141 8.1.6Resources........................................153 8.1.7ExamplesofSecurityUsingHTTPandSSL...............156 8.2 Enterprise JavaBeans . ................................174 8.2.1EJBStructure......................................175 8.3 Extensible

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    306 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us