Skip to Content
0
Former Member
Aug 01, 2005 at 11:55 AM

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

25 Views

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