cancel
Showing results for 
Search instead for 
Did you mean: 

How Can I Call the method in WAR project's class?

Former Member
0 Kudos

...

Message was edited by: JUNHA SHIN

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Junha,

Web Project is used for developing presentation layer not for business logic. And WD is also used for Presentation layer. So, there may be problem when you wants to call one client(presentation) application from another client application. But as you getting error, This error is due to your look up path. Replace your look up path with "sap.com/<Your EAR application name>/<Your EJB app. or Web app. name>".

Just try by applying this look up and let me know the status.

Regards,

Bhavik

Former Member
0 Kudos

Hi,

This is just general info..

in MVC Architecture Model is your Bean where all your Business logic resides (this what EJB/EJB project(EAR), where as your view is presentation all your presentation logic will Web project (WAR) where as Controller is the one resides between view and model which try to get the data from the model fine tune it t the format which your view requires.

coming to your secnario EAR is a bundle of WAR,EJB archive

if u elaborate lilltle bit when are you calling method from WEB project, i can help you

Regards,

RK

Former Member
0 Kudos

I have one correct Web Moudule Project.

The EAR project(EmployeeCardJdoEar) added the WAR archive

(EmployeeCardJdoWar) is run correctly.

I want to add the war archive to my WD project.

because, the war project contain business logic to be reused.

so. i had enrolled in my WD project's properties ->

Web Dynpro References -> Sharing References ->

sap.com/EmployeeCardJdoEar.

but, this method in WAR(EmployeeCardJdoWar) occurs Exception.

.....

Context ctx = new InitialContext();

pmf = (PersistenceManagerFactory)

ctx.lookup("java:comp/env/jdo/defaultPMF");

.....

I think lookup call is not run correctly.

But, this lookup is run correctly in my EAR project.

Former Member
0 Kudos

I hope i understand you right.

You will call a classmethode from your webdynpro and

the class is in a WAR-File?

A WAR have a own classloader, you can't call methodes outside the WAR.