cancel
Showing results for 
Search instead for 
Did you mean: 

How access portal application project classes from other portal app project

Former Member
0 Kudos

I created a portal application project in NWDS. I added few classes under src.core. I created another portal application project with JSPDynPage in NWDS. I want to use the first portal application project class into second portal application project. I am not yet created any par file. Could you please help me how to make reference and get the access to first classes.

-Sudheer.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi sudheer,

The first thing is you cannot access the classes under src.core in any other application.The classes can be accessed only by the application in which they are defined.To make a class available to other applications you have to define them under src.api.

To access these classes do the following.

1.Add the jar files (your src.api classes) in the "java build path" of your second application.(This for compile time)

2.add the "sharing reference" property in the application-config tag.

the value of the property should be the application name.

(this for runtime).

Hope this helps.

Regards

~Pradeep Shetty

Former Member
0 Kudos

Hi Pradeep,

Inorder to classes to be available on other application project you mentioned that I need to add jar files (src.api classes) in the java build path on second application. I didn't follow this 1 step on your post.

-Sudheer

Former Member
0 Kudos

Hi sudheer,

If you have Java development role in your portal then go to Tools-->Portal Browser

Here follow the below given path

Root/WEB-INF/portal/portalapps

Here search for your deployed application whose classes you want to access.Browse in this folder.Go to the lib folder.

Download the jar file.This is the jar file that you have to add in the Java Build path.

If you don't have the java development role you can do the following.

In the package explorer Right click on the src.api of your application and select export.

Select the option "Jar".You can then add this exported jar file in the build path.

Hope this is clear.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Sudheer,

This might help u:

Regards,

Pooja.

Former Member
0 Kudos

Hi sudheer,

By using portal services you can get the services in one project to be available to another project. But i am not sure abt using class.

Regards

gEorgE