cancel
Showing results for 
Search instead for 
Did you mean: 

WDURLGenerator returning Resource Path which doesn't exist on server

paul_abrahamson_sap
Active Participant
0 Kudos

Hi,

Within a Web Dynpro Java component I am trying to get a resource which has been placed in the

Folder - Resources > src > configuration > Components > com.acme.product.ui.adobe.wd.comp.renderpdfcomp.RenderPdfComp

WDURLGenerator.getResourcePath(wdThis.wdGetAPI().getDeployableObjectPart(),"FormTemplate.xdp")

At runtime the above statement generates the following URL:


C:\usr\sap\UA1\J00\j2ee\cluster\apps\acme.com\product~ui~adobe\servlet_jsp\webdynpro\resources\acme.com\product~ui~adobe\root\Components\com.acme.product.ui.adobe.wd.comp.renderpdfcomp.RenderPdfComp\FormTemplate.xdp

However on the server it actually exists at:


C:\usr\sap\UA1\J00\j2ee\cluster\apps\acme.com\product~ui~adobe\servlet_jsp\webdynpro\resources\acme.com\product~ui~adobe\root\WEB-INF\webdynpro\Components\com.acme.product.ui.adobe.wd.comp.renderpdfcomp.RenderPdfComp\FormTemplate.xdp

The main difference is the 'WEB-INF\webdynpro' is not included in the generated URL but does exist in the file structure on the j2ee server.

As a result subsequent processing fails to find the file located at the component's resource location.

I've tried generating to the path to the resource using

WDURLGenerator.getResourcePath(wdComponentAPI.getDeployableObjectPart(),"FormTemplate.xdp")

And this does the same thing.

Any help would be appreciated.

Paul

Accepted Solutions (1)

Accepted Solutions (1)

Stefan-EA
Contributor
0 Kudos

Copy the com.acme.product.ui.adobe.wd.comp.renderpdfcomp.RenderPdfComp folder and the FormTemplate.xdp

from

Folder - Resources > src > configuration > Components > com.acme.product.ui.adobe.wd.comp.renderpdfcomp.RenderPdfComp

to

Folder - Resources > src > mimes > Components

The FormTemplate.xdp will now be in

Folder - Resources > src > mimes > Components > com.acme.product.ui.adobe.wd.comp.renderpdfcomp.RenderPdfComp

You will be then able to access it with the following code


WDURLGenerator.getResourcePath(wdThis.wdGetAPI().getDeployableObjectPart(),"FormTemplate.xdp")

.

paul_abrahamson_sap
Active Participant
0 Kudos

Thanks Stefan that worked!

Answers (0)