> 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