• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
(no subject)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

(no subject)


  • Subject: (no subject)
  • From: Mehul Pattni <email@hidden>
  • Date: Thu, 15 Sep 2005 17:49:29 -0700

Hi All,

 

I'm trying to start an instance of WOApplication to use in my junit test case.  I'm using eclipse and junit.  I have simple application named HelloWorld.woa with a component named Main.  I have a test case named TestMain.java to test this component. I'm getting the error below.  I have checked all the paths.  Junit works for other classes.  What am I missing?

this is the setup() method:



public void setUp() throws Exception {
        super.setUp();
       
        try {
            URL url = "" URL("file:/Library/WebObjects/Applications/");

            WOApplication.primeApplication("HelloWorld.woa", url, null);
            WOApplication apps = WOApplication.application();

            WORequest request = new WORequest("GET", "/", "HTTP/1.1", null, null, null);

            WOContext context = new WOContext(request);

            WOComponent page = WOApplication.application().pageWithName("Main", context);

            WOResponse response = page.generateResponse();

            System.out.println(response.toString());
            

        } catch (MalformedURLException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }

    }

This is the error I'm getting:

<com.webobjects.appserver.WOApplication>: Unable to create page 'Main'.



Any help is much appreciated.

 

Mehul
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: [SOLVED] Re: How to use WOActiveImage to call a DirectAction with a parameter
  • Next by Date: Re: query a null via query match does not work
  • Previous by thread: Re: junit and WebObjects Components
  • Next by thread: EOClientApplicationSupport.main?
  • Index(es):
    • Date
    • Thread