cancel
Showing results for 
Search instead for 
Did you mean: 

how to read a property/param from portalapp.xml / default.properties in JSP

Former Member
0 Kudos
210

Hello

I need some help reading a property from portalapps.xml in the jsp. Im creating a PCR-form which calls a bsp-Page. But the Servername of the BSP-Page should be read from the portalapps.xml for easier maintainance.

But because im using the pcr-Framework (or ISR-Framework) i don't have a jspDynPage. So my question is, if it's possible to get the parameter out of portalapps.xml just with the jsp? Or is it possible to instantiate a bean to get those params?

Thanks a lot.

Stefan

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

i dont remember from the top of my head + i'm falling asleep. but.. try this

IPortalComponentContext ctx = componentRequest.getComponentContext();
IPortalComponentProfile profile = ctx.getProfile();
String value = profile.getProperty("propertyID");

componentRequest is avaiable in JSP just like the response object. You need not to instantiate it.

getProperty("propertyID") is used to retrieve whatever propertyid you have in your portalapp.xml for that particular component you are executing.

goodluck