RE: Getting file information

2001-06-18 Thread Michael Wentzel

 Greetings to all, newbie here.
 Would like to ask if anyone knows how to get the file 
 information such as the file name(not the entire path)
 of the running JSP file?
 
 Let's say i were to run confirmation.jsp, how do i get the 
 filename to a string when confirmation.jsp is running?
 I tried getRealpath and it returns the entire directory with 
 the filename.Could i just get the filename instead?

Why not just do a substring on getRealPath() based on the
lastIndexOf(FILE_SEPARATOR)?  Parsing this String is not
very complicated.  You can even write it in such a way that
code will not have to be changed if it is moved to a OS with a
different file separator( using java.io.File.separator ).


---
Michael Wentzel
Software Developer
Software As We Think - http://www.aswethink.com



Getting file information

2001-06-17 Thread Foo Shi Hao

Greetings to all, newbie here.
Would like to ask if anyone knows how to get the file information such as the file 
name(not the entire path)
of the running JSP file?

Let's say i were to run confirmation.jsp, how do i get the filename to a string when 
confirmation.jsp is running?
I tried getRealpath and it returns the entire directory with the filename.Could i just 
get the filename instead?

Thanks, Zeon
-- 

Get your free email from www.doramail.com with 30 Megs of disk space in webhosting and 
e-mail storage!





Powered by Outblaze