Use ServletContext.getResource() instead. getRealPath() will return 'null'
if application is running from an archive.

Regards,
    Konstantin Piroumian

----- Original Message -----
From: "Prior, Simon" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Friday, November 02, 2001 1:37 PM
Subject: Problem with EAR file


> Hi guys,
>
> This isn't strictly a struts question but I have
> been wracking my brains trying to solve it with no
> luck.  I wondered if any of you guys could help....
>
> I am deploying an ear file under weblogic 6.1
> and in part of the code I need to parse an
> xml file however, I can't figure out how to
> specify the path to the file. Whatever I try
> I always get an exception telling me the
> file cannot be found. The file itself resides
> within WEB-INF in the applications jar file
> which itself resides within the ear.
>
> I have tried using the action servlets
> ServletContext.getRealPath(thefilename.xml)
> but always get null returned.
>
> I don't know how to specify the files location.
>
> Please help!
>
> Simon.
> For optimum solutions that save you time, visit www.ds-s.com.
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>

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

Reply via email to