cancel
Showing results for 
Search instead for 
Did you mean: 

InputStream in AbstractPortalComponent

Former Member
0 Kudos

Hello developers...

I would like to obtain an InputStream in my AbstractPortalComponent and tried to instantiate it like this:


IResource res = request.getResource(IResource.SCRIPT, "reports/SAPPortalPDF.jasper");String path = res.getResourceInformation().getSource();
InputStream in = getClass().getResourceAsStream(path);

the InputStream is null in this case. The specified path is valid... Is there another way obtaining an InputStream to a resource?

View Entire Topic
Former Member
0 Kudos

Jochen,

did you check this

InputStream inp = this.getClass().getClassLoader().getResourceAsStream("com/package1/abc.xml");

Thanks

Bala Duvvuri