on 2005 Nov 01 3:29 PM
Hi,
I have a project that has a jsp that I would like to reference in another project. Does anyone have an idea how to do this?
My first project is defined:
<application alias="NEW_SAP_PORTAL_COMMON">
</application>
and my second is defined in it's own portalapp.xml:
<application>
<application-config>
<property name="startup" value="false"/>
<property name="SharingReference" value="htmlb, jcoclient, landscape,NEW_SAP_PORTAL_COMMON"/>
</application-config>
<components>
<component name="Help">
<component-config>
<property name="ResourceBundleName" value="help"/>
<property name="ClassName" value="com.ba.portal.vendor.help.controller.BAHelpController"/>
<property name="SecurityZone" value="com.ba.portal.vendor.help.controller/high_safety"/>
</component-config>
<component-profile>
<property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld"/>
</component-profile>
</component>
</components>
</application>
I would like to create a repository for common jsps like errorfile, tablefiles, and other common components.
thank you in advance for your help,
Mariana
Hi Mariana,
what you can do is to link directly to your JSP if it is declared as "JSPnative". Then you can call the JSP via the link "AppName.CompName". For this, you even don't need a SharingReference to your common application.
But have in mind that if the JSPs are really dynamic, you will have to use the HttpSession (and not the PortalComponentSession) for delivering data, for the JSP belongs to a different component (even to a different application) and is not able to access the component session.
Hope it helps
Detlev
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Thank you for your help, but I am getting the following error:I am getting the error:
File NEW_SAP_PORTAL_COMMON.messagepage cannot be found.
the portalapp.xml of the application containing the jsp is:
<application alias="NEW_SAP_PORTAL_COMMON">
<application-config>
<property name="startup" value="true"/>
<property name="ServicesReference" value="com.sap.portal.htmlb, com.sap.portal.ivs.iviewservice, com.sap.portal.ivs.connectorservice, com.sap.portal.runtime.system.inqmy, com.sap.portal.pcd.glservice, com.sap.portal.ivs.systemlandscapeservice,com.sap.portal.pcmbuilderservice, usermanagement, com.sap.portal.ivs.logger, com.sap.portal.usermapping , landscape, jcoclient"/>
<property name="releasable" value="true"/>
<property name="PrivateSharingReference" value="com.sap.portal.htmlb"/>
</application-config>
<component name="messagepage">
<component-config>
<property name="ComponentType" value="jspnative"/>
<property name="JSP" value="jsp/includes/msg_include.jsp"/>
<property name="SecurityZone" value="com.sap.portal.pdk/low_safety"/>
</component-config>
<component-profile>
<property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld"/>
</component-profile>
</component>
</application>
I am referring to this jsp as an include in another jsp:
<%@ include file="NEW_SAP_PORTAL_COMMON.messagepage" %>
can you please tell me what I am doing wrong.
Hi Mariana,
that was a misunderstanding; I thought of simply calling the component. If you want to include the JSP, there may be different possibilities; I would suggest the following way, for I'm also unsure how the mechanism works in detail in this case:
Use SysInternals free FileMon to check at what level your "include" tries to access the file. In my eyes, it's quite unprobable that a call by App/Component name will be successful, but you could put your JSPs into the public part of your Application, so that it isn't hidden under WEB-INF. Doing this, you'll just have to determine which relative or absolute path you have to use (by using the tool named above).
Hope it helps
Detlev
User | Count |
---|---|
58 | |
10 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.