You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Rob S." <rs...@sfu.ca> on 2001/08/16 19:01:53 UTC
Re: File not readable (fwd)
> java.lang.IllegalArgumentException:
> "APACHE$DISK:[APACHE.JAKARTA.WEBAPPS.aba2]000000EB.TIF": File is not
> readable.
I have no idea what javax.media is, but it looks like you're trying to use
environment variables from inside a web app. On the command-line, they will
be resolved and the right values put in to Java. In a web app, since there is
no shell to resolve them, they are taken literally.
- r
Re: File not readable (fwd)
Posted by Andrej Rosenheinrich <ar...@minet.uni-jena.de>.
Well,
this aint it. I resolved the variables using RealPath, checked the
resolved filename, same result. Here is a fast test i tried:
/* test File
try
{
File inputfile = new
File("APACHE$DISK:[APACHE.JAKARTA.WEBAPPS.aba2]000000EB.tif");
try
{
if (inputfile.isFile())
{
out.println("File is a normal file ...<BR>");
}
else
{
out.println("File is NOT a normal file ...<BR>");
}
}
catch (SecurityException exp)
{
out.println("Securitymanager denies access to
file!!!");
}
try
{
if (inputfile.canRead())
{
out.println("File is readable ...");
}
else
{
out.println("File is NOT readable ...");
}
}
catch (SecurityException exp)
{
out.println("Securitymanager denies access to
file!!!");
}
}
catch (NullPointerException exp)
{
out.println("Filename ist null ...");
}
*/ //End Test File
the file exists, it's a normal file, but I cant read it. I dont think it's
a thing with permissions, cause then I should get a SecurityException
trying to access it ...
Andrej
On Thu, 16 Aug 2001, Rob S. wrote:
> > java.lang.IllegalArgumentException:
> > "APACHE$DISK:[APACHE.JAKARTA.WEBAPPS.aba2]000000EB.TIF": File is not
> > readable.
>
> I have no idea what javax.media is, but it looks like you're trying to use
> environment variables from inside a web app. On the command-line, they will
> be resolved and the right values put in to Java. In a web app, since there is
> no shell to resolve them, they are taken literally.
>
> - r
>
>
Andrej Rosenheinrich
-------------------------------------------------------------------------------
"I lived a thousand times, I found out what it means to be believed"
Black Sabbath
email : aros@minet.uni-jena.de
http : www.minet.uni-jena.de/~aros
Tel : (+49) 0177/8743619
(+49) 03641/448695