WebSphere software- Copyright IBM Corporation 2005. All rights reserved. Web Deployment Descriptor-IBM WebSphere Application Server Toolkit, V6.0 Edt Navigate Search Project Run window Help △J6。“8」势·0·9··s,一 日·日 lcation DeploymentS Enterprise Applcations General Information Usage Display name: Defaut Web Application The folowng Enterprise Applicaticns use this web module Description is the IBM Web Sohere Appicaton Se\ <i Deployment Descriptor: Def aut web Applicaion Refres 由 t-E servlet Mappings Session time out: 口 Distributable 」 olong servlets and ]SPs are used in this application: Web Library projects The following JARs are mapped to Java projects: Detais.I tAsmA Sevlet Lo Database Servers Filters erercesWs Hardier Pages Variables Extensions Source Probems Tasks 2 Propeties Servers Console The Overview Page in the Web Deployment Descriptor Editor, provides a summary of the contents of the web deployment descriptor c. Observe that the DefaultApplication contains three(3)servlets: Snoop Servlet, Hello Pervasive Servlet and Hit Count Servlet d. Click the Snoop Servlet link to open the Servlets page in the Editor oof of Technology ab 03-Application Management Product Introduction Exploration(PI+E Page 11 of 42
© Copyright IBM Corporation 2005. All rights reserved. Proof of Technology Lab 03 – Application Management Product Introduction + Exploration (PI+E) Page 11 of 42 The Overview Page in the Web Deployment Descriptor Editor, provides a summary of the contents of the web deployment descriptor. ___ c. Observe that the DefaultApplication contains three (3) servlets: Snoop Servlet, Hello Pervasive Servlet, and Hit Count Servlet. ___ d. Click the Snoop Servlet link to open the Servlets page in the Editor
Copyright IBM Corporation 2005. All rights reserved. e. The Servlets page lets you create a new servlet, add an existing servlet or JSP file to the deployment descriptor, or remove the selected servlet or JSP file from the deployment descriptor. You can also add URL mappings for servlets Servlets and )5Ps v Details The folowing serves and JSPs are used in this application Detals of the selected servlet or JSp Servlet class: ISnoopservlet sNoop Servlet Display name: Snoop Servlet S Hello Pervasive Servlet Description: This servlet returns information a 6 Hit Count Servlet URL Mappings The folowing URLs are mapped to this servlet e servet mapping (snoop/+-> Snoop Servet)EAdd. Add.. Remove f. observe the Servlet Mappings for each of the servlets by clicking on them Note that the URL Mapping for Snoop Servlet is /snoop/ In a previous step we observed that the Context root for DefaultApplication is/'. Since the context root is"/and the URL pattern is"/snoop/, the full URL for Snoop Servlet is http:/<hostname>/snoo Assume that the context root for the Web Module is " webapp" and the servlet mapping is /snoop. Then the full URL for Snoop Servlet would be http://shostname>/webapp/snoop Assume that the context root for the Web Module is webapp" and the servlet mapping is examples/snoop. Then the full URL for Snoop Servlet would be http://shostname>/webapp/lexamples/snoop g. Click the Extensions tab at the bottom of the editor. This displays the WebSphere Extensions ab 03-Application Management
© Copyright IBM Corporation 2005. All rights reserved. Lab 03 – Application Management Page 12 of 42 ___ e. The Servlets page lets you create a new servlet, add an existing servlet or JSP file to the deployment descriptor, or remove the selected servlet or JSP file from the deployment descriptor. You can also add URL mappings for servlets. ___ f. Observe the Servlet Mappings for each of the servlets by clicking on them. Note that the URL Mapping for Snoop Servlet is ‘/snoop/*’. In a previous step we observed that the Context root for DefaultApplication is ‘/’.Since the context root is “/” and the URL pattern is “/snoop/*, the full URL for Snoop Servlet is: http://<hostname>/snoop Assume that the context root for the Web Module is “webapp” and the servlet mapping is “/snoop”. Then the full URL for Snoop Servlet would be: http://<hostname>/webapp/snoop Assume that the context root for the Web Module is “webapp” and the servlet mapping is “/examples/snoop”. Then the full URL for SnoopServlet would be: http://<hostname>/webapp/examples/snoop ___ g. Click the Extensions tab at the bottom of the editor. This displays the WebSphere Extensions
Copyright IBM Corporation 2005. All rights reserved. The WebSphere Extensions page allows you to specify settings for WebSphere extensions such as servlet reloading, file serving, JSP pre compilation, etc File Serving Attributes 区 Reloading enabled dd Reload interval Default error page: □ File serving enabled □ Directory br a serve servlets by classname 口 Precompile JSPs value h. Observe that the File serving enabled property is not set. This property must be set for Web Sphere to serve static HTML files(such as welcome pages)and GIFs i. Observe that serve servlets by classname is enabled. This extension specifies whether a servlet can be served by requesting its class name. Usually, servlets are served only through a URI reference. Since this extension has been enabled, the Snoop Servlet may be served by entering its classname j. There are several tabs that can be used to access Web deployment descriptor pages(for Filters, Security, Preferences, etc. k. Close the Web Deployment Descriptor file. 6. Introduction to the EJB Deployment Descriptor Editor. a. Access the Project Explorer pane, and expand the EJB Projects, Increment b. Double-click Deployment Descriptor: Increment Enterprise Java Bean. The Overview page is opened in the EJB Deployment Descriptor editor C. Press the F1 key to access help information for the EJB Deployment Descriptor Overview page d. Click the link for EJB Deployment Descriptor editor. Review the help information become familiar with the EJB Deployment Descriptor editor e. Close the Help window oof of Technology Lab 03-Application Management Product Introduction Exploration(PI+E Page 13 of 42
© Copyright IBM Corporation 2005. All rights reserved. Proof of Technology Lab 03 – Application Management Product Introduction + Exploration (PI+E) Page 13 of 42 The WebSphere Extensions page allows you to specify settings for WebSphere extensions such as servlet reloading, file serving, JSP pre compilation, etc. ___ h. Observe that the File serving enabled property is not set. This property must be set for WebSphere to serve static HTML files (such as welcome pages) and GIFs. ___ i. Observe that Serve servlets by classname is enabled. This extension specifies whether a servlet can be served by requesting its class name. Usually, servlets are served only through a URI reference. Since this extension has been enabled, the Snoop Servlet may be served by entering its classname. ___ j. There are several tabs that can be used to access Web deployment descriptor pages (for Filters, Security, Preferences, etc.). ___ k. Close the Web Deployment Descriptor file. ___ 6. Introduction to the EJB Deployment Descriptor Editor. ___ a. Access the Project Explorer pane, and expand the EJB Projects Æ Increment. ___ b. Double-click Deployment Descriptor: Increment Enterprise Java Bean. The Overview page is opened in the EJB Deployment Descriptor editor. ___ c. Press the F1 key to access help information for the EJB Deployment Descriptor Overview page. ___ d. Click the link for EJB Deployment Descriptor editor. Review the help information to become familiar with the EJB Deployment Descriptor editor. ___ e. Close the Help window
Copyright IBM Corporation 2005. All rights reserved. f. Click the Overview tab to ensure that the Overview page is open in the editor You can use the Overview page to view, create, and modify function that' s provided by the EJB tooling le Edi: Navigate Search Project Run window Help ,图△a“8妙·0·9…4·|sy, qk8日a| pplication Depbyment Desai Increment Enterprise Java Bean - General Information Increment Enterprise Java Bean plowing enterprise applications use this EDB modue Deployment Descriptor: Increment Enterprise Java Bean Descrption Increment EB used by the REfresh s Message-Driven Beans folowing Enterprise JavaBeans are used in this appication Incremen EB Detals. Assembly Descriptor E RE System Lbrary [WebSphere v6 RRE] missions, and security rolas defined for this EB application References Ejb client Jar Problems tAsks 2 Properties Servers consol g. Observe that Default Application contains a single EJB called IncrementEJB h. Scroll down the Overview page to the Web Sphere Bindings section i. Observe that Increment uses Cloudscape database for persistence and that it's JNDI name for it's datasource is defaultDatasource WebSphere Bindings The following are binding properties for the Websphere Application Server Backend id JNDI-CMP Connection Factory Binding Choosing a backend id determines the persister classes that get Binding on the JAR level will create a"default "Connection Factory for CMP beans. nt: CLOUDSCAPE_V50_1 DefaultDatasource D Container authorizattonty JAAS Login Configuration These properties can be modified using the AST or during deployment to WebSphere Application Server. As part of this exercise, we will deploy the DefaultApplication such that Increment EJB uses Cloudscape for database persistence ab 03-Application Management
© Copyright IBM Corporation 2005. All rights reserved. Lab 03 – Application Management Page 14 of 42 ___ f. Click the Overview tab to ensure that the Overview page is open in the editor. You can use the Overview page to view, create, and modify function that’s provided by the EJB tooling. ___ g. Observe that DefaultApplication contains a single EJB called IncrementEJB. ___ h. Scroll down the Overview page to the WebSphere Bindings section. ___ i. Observe that Increment uses Cloudscape database for persistence and that it's JNDI name for it’s datasource is DefaultDatasource. These properties can be modified using the AST or during deployment to WebSphere Application Server. As part of this exercise, we will deploy the DefaultApplication such that Increment EJB uses Cloudscape for database persistence