Skip to Content
author's profile photo Former Member
Former Member

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

...

Message was edited by: JUNHA SHIN

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Feb 22, 2005 at 01:13 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 22, 2005 at 01:22 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 23, 2005 at 04:12 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 23, 2005 at 05:10 AM

    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/ EAR application name>/ ".

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

    Regards,

    Bhavik

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.