cancel
Showing results for 
Search instead for 
Did you mean: 

How to retrieve the data/property value from portalapp.xml

Former Member
0 Kudos
188

Hi I would like to retrive the some common data from the portalapp.xml file

<application>

<application-config>

<property name="PrivateSharingReference" value="com.sap.portal.htmlb"/>

</application-config>

<components>

<component name="DynZMMGR">

<component-config>

<property name="ClassName" value="DynZMMGR"/>

<property name="SecurityZone" value="DynZMMGR/high_safety"/>

<property name="ComponentType" value="jspnative"/>

<property name="JSP" value="pagelet/DynJspZMMGR.jsp"/>

</component-config>

<component-profile/>

</component>

<component name="dynpagedel">

<component-config>

<property name="ClassName" value="dynpagedel"/>

</component-config>

<component-profile/>

</component>

<component name="VARIANTLIST">

<component-config>

<property name="ClassName" value="com.sap.ep.r3rpts.VARIANTLIST"/>

<property name="SecurityZone" value="com.sap.ep.r3rpts.VARIANTLIST/high_safety"/>

</component-config>

<component-profile/>

</component>

<component name="DynZMM33">

<component-config>

<property name="ClassName" value="DynZMM33"/>

<property name="SecurityZone" value="DynZMM33/high_safety"/>

<property name="ComponentType" value="jspnative"/>

<property name="JSP" value="pagelet/DynJspZMM33.jsp"/>

</component-config>

<component-profile/>

</component>

....

....

</components>

<services/>

</application>

The above is my portalapp.xml file .

I want to retrieve the common data across the component.

These datas are common across the components .

I kmow by putting the data inside the

component name="DynZMM33">

<component-config>

<property name="ClassName" value="DynZMM33"/>

<property name="SecurityZone" value="DynZMM33/high_safety"/>

<property name="ComponentType" value="jspnative"/>

<property name="JSP" value="pagelet/DynJspZMM33.jsp"/>

</component-config>

<component-profile>

<property name="UserID" value="userid"/>

<property name="password" value="password"/>

</component-profile>

</component>

.....

this becoms component specific ... which I can retriev the by using

String ClientVal = request.getComponentContext().getProfile().getProperty("Client");

in doContent() method ..

But this way i have to specify these properties in all the component.. which is repetetive in nature.

I would rather put it in common location and want to retrieve the info from the portalapp.xml...

How to achieve this

I am using "AbstractPortalComponent" .

thanks

pkiran

Accepted Solutions (0)

Answers (1)

Answers (1)

detlev_beutner
Active Contributor
0 Kudos

Hi Prashanth,

see and

Anyhow, maybe you should implement a service which returns the values (from the service profile). This would be more clean for accessing global values.

Hope it helps

Detlev