您好,欢迎访问三七文档
SAPCOMMUNITYNETWORKSDN-sdn.sap.com|BPX-bpx.sap.com|BOC-boc.sap.com|UAC-uac.sap.com©2010SAPAG1ExternalLibraryDeploymentandUsageinSAPNetWeaverDeveloperStudio(NWDS)Appliesto:SAPNetWeaver,SAPNetWeaverDeveloperStudio7.0.16,SAPJava,ExternalLibrariesFormoreinformation,visittheJavahomepage.SummaryThisarticlewillguideyouthroughstepbystepprocessofusinganexternallibraryinexistingwebapplication.AnexternallibraryDevelopmentComponentwillbefirstcreatedandthendeployedtoapplicationserver.Author:SaurabhAgarwalCompany:Steria,IndiaCreatedon:27thFebruary2010AuthorBioSaurabhAgarwalisworkingasaConsultingEngineerwithSteriaIndiaLtd.HehasbeeninvolvedinJavabasedportaldevelopment(NetweaverDeveloperStudio),andalsohasknowledgeofSAPEnterpriseportal(Administration),JavaWebDynpros.HecanalsocontributeandmodifyapplicationsinABAPandABAPWebDynpros.ExternalLibraryDeploymentandUsageinSAPNetWeaverDeveloperStudio(NWDS)SAPCOMMUNITYNETWORKSDN-sdn.sap.com|BPX-bpx.sap.com|BOC-boc.sap.com|UAC-uac.sap.com©2010SAPAG2TableofContentsIntroduction.........................................................................................................................................................3AddJARto“ExternalLibrary”typeDevelopmentComponent...........................................................................3Step–CreateDevelopmentComponent“ExternalLibraryContainerDC”.......................................................3Step–AddJARlibraryfileto“ExternalLibraryContainerDC”.........................................................................5ExposelibrarytobeusedbyotherDevelopmentComponents.........................................................................6Step-Add“publicparts”to“ExternalLibraryContainerDC”.............................................................................6Step–AddJARfiletopublicpart.................................................................................................................10Createadeployableunitfor“ExternalLibraryContainerDC”.............................................................................11Step–CreateaDevelopmentComponentoftype“J2EEservercomponent-Library”.............................11Step–Reference“ExternalLibraryContainerDC”from“externallibrary_deployableunit”..............................12Step-Builtanddeploy“externallibrary_deployableunit”..............................................................................14Step–Crosscheckwhetherithasreachedserver.......................................................................................16Usingdeployedlibraryinyourwebapplication................................................................................................17Step–Createdependencyto“externallibrary_deployableunit”from“WebApplicationDC_EA”...................17Step–Createdependencyto“ExternalLibraryContainerDC”from“WebApplicationDC_WA”.....................18Step–Addreferenceto“ApachePOI”in“WebApplicationDC_EA”..............................................................19RelatedContents..............................................................................................................................................23DisclaimerandLiabilityNotice..........................................................................................................................24ExternalLibraryDeploymentandUsageinSAPNetWeaverDeveloperStudio(NWDS)SAPCOMMUNITYNETWORKSDN-sdn.sap.com|BPX-bpx.sap.com|BOC-boc.sap.com|UAC-uac.sap.com©2010SAPAG3IntroductionOftentherearescenarioswhereinsideyourwebapplicationyouneedtoreferencesomeJARfile.Like,youneedtogivedownloadfunctionalityinxlfformatforyourjavareport.ForthispurposeyouwishtouseApachePOIJarfiles.Thisdocumentwillguideyouthroughastepbystepprocessforusinganexternallibraryinsideyourexistingwebproject.First,youwilllearnhowtodeploythisJARfileinapplicationserverandthenhowtoreferenceitfromwithinyourexistingwebdevelopmentcomponent.Iassumethatyoualreadyhaveyourwebdevelopmentcomponentanditscorrespondingdeploymentcomponent(EnterpriseApplicationDevelopmentComponent)alreadycreatedinyourworkspace.Ihavenamedthem:WebApplicationDC_WA(WebDevelopmentComponent)WebApplicationDC_EA(EnterpriseApplicationDevelopmentComponent)Inbelowstepbystepprocesswewillcreatean“ExternalLibrary”DevelopmentComponentwhichwillcontainourJARfile.WewillnameitasExternalLibraryContainerDCOncewehaveaJARinsideabovecontainer(ExternalLibraryContainerDC),weneedtodeployitonapplicationserver.ForthispurposewerequireadeployableunitforthislibrarycontainerDCoftype“J2EEservercomponent-Library”.WewillnameitasExternalLibrary_DeployableUnitAddJARto“ExternalLibrary”typeDevelopmentComponentThiscomponentwillactasactualcontainerforourJARfile.Step–CreateDevelopmentComponent“ExternalLibraryContainerDC”ClickonFile-New-OtherExternalLibraryDeploymentandUsageinSAPNetWeaverDeveloperStudio(NWDS)SAPCOMMUNITYNETWORKSDN-sdn.sap.com|BPX-bpx.sap.com|BOC-boc.sap.com|UAC-uac.sap.com©2010SAPAG4SelectDevelopmentComponentandclickonNext.SelectLocalDevelopment-MyComponentsandclickNextExterna
本文标题:External Library Deployment and Usage in SAP NetWe
链接地址:https://www.777doc.com/doc-3138273 .html