Package PAR Development
Components in an EAR file
1. Create a new development component of type Enterprise Portal → Portal Application Module in Local Development → My Components. Name this development component tc/epbc/test/parinear1. Name the PAR file com.sap.test.parInEar.par.
2. Create a new portal component of type AbstractPortalComponent in the portal development component. Call this component testComponent. Add a Hello World to doContent method as follows:

public void doContent( IPortalComponentRequest request, IPortalComponentResponse response) {
If (request!=null && response!=null) { response.write("TestAC2: Hello World!") } } |
3. Create a new development component of type J2EE → Enterprise Application in Local Development. Name this development component tc/j2ee/test/ear1.
4. In the J2EE DC Explorer view, expand the development component metadata/DC Definition nodes of this J2EE development component to display Used DC's.
5. Open the context menu on Add Used DC.
6. Expand Local Development → My Componentsand locate tc/epbc/test/parinear1. Expand the development component definition, open public part node and select the PAR Public Part of the development component to which you want to create a reference.
7. Make sure only the BuildTime option is selected and choose Finish.
8. From the J2EE DC Explorer view, open the application-j2ee-engine.xml of LocalDevelopment~tc~j2ee~test~ear1 J2EE DC project.
9. Go to the expert setting tab to display the module node. In the Module to deploy field, type the PAR name of the portal development component: com.sap.test.parInEar.par. Expand this new node to show specify container and type: PortalRuntimeContainer. Save the file.
10. Switch to Source tab to check the content of the XML file.
11. Make a DC Build of this J2EE Enterprise Application development component.
12. In the J2EE DC Explorer view, open the context menu for the LocalDevelopment~tc~j2ee~test~ear1 project and choose Deploy.