If any of the committers are interested, here is the code I created for
getRealPath():

   public String getRealPath(String path) {

        try {
            return new File("./", path).getCanonicalPath();
        } catch (IOException e) {
            return new File("./", path).getAbsolutePath();
        }
    }

David Thielen
303-499-2544
www.windwardreports.com


-----Original Message-----
From: David Thielen [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 02, 2005 3:21 PM
To: user@struts.apache.org
Subject: [shale] shale test framework

Hi;

 

For those that hit the same problem - you need to call super.setUp() and
super.tearDown() in your setUp/tearDown.

 

Also, servletContext.getRealPath() is not implemented in the mock objects.
Is there a reason why it doesn't return the default directory?

 

Finally, I need to determine at one place in my code if I am running as a
test or for real. Any suggestions on the best way to do it?

 

Thanks - dave

 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to