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 {
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 |