A
Asad
I have a JSP located at:
G:/tomcat4/webapps/reportmanager/foo.jsp
Inside this jsp file I have this scriptlet:
<%
File Name= new File("G:/tomcat4/webapps/reportmanager/WEB-INF/classes/sample.xml");
if(!Name.exists())
{
%> sample.xml does not exist <%
}
else
{
%> sample.xml exists! <%
}
%>
Now I want to use relative filepath, but I am unable to do that. I
tried the following instead of the path indicated above but none of
these seem to work:
/WEB-INF/classes/sample.xml
../WEB-INF/classes/sample.xml
WEB-INF/classes/sample.xml
Note, once again that foo.jsp is located at
G:/tomcat4/webapps/reportmanager/foo.jsp itself.
Any ideas?
Thanks.
G:/tomcat4/webapps/reportmanager/foo.jsp
Inside this jsp file I have this scriptlet:
<%
File Name= new File("G:/tomcat4/webapps/reportmanager/WEB-INF/classes/sample.xml");
if(!Name.exists())
{
%> sample.xml does not exist <%
}
else
{
%> sample.xml exists! <%
}
%>
Now I want to use relative filepath, but I am unable to do that. I
tried the following instead of the path indicated above but none of
these seem to work:
/WEB-INF/classes/sample.xml
../WEB-INF/classes/sample.xml
WEB-INF/classes/sample.xml
Note, once again that foo.jsp is located at
G:/tomcat4/webapps/reportmanager/foo.jsp itself.
Any ideas?
Thanks.