Path to dir

Hi,I wonder how I can get the path to the directory where the jsp files are from a javabean. I don't want to get it from a jsp page and then send it to the javabean.
[180 byte] By [ripita] at [2007-11-27 9:31:59]
# 1
hi,please tell briefly, i cant get your message what u want !!!now u want the path of jsp files located or what
drvijayy2k2a at 2007-7-12 22:48:18 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
You can use ServletContext#getRealPath() to retrieve the absolute path for the given relative path.
BalusCa at 2007-7-12 22:48:19 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

Hi,

what I wan't to do I read and write to a file from a javabean and when I read from the file I only wan't to send the node name, because in this example it's a xml file. So what I did to solve it was:

URL path = this.getClass().getClassLoader().getResource("../../conf/config.xml");

So if there is any better way to solve it I would be glad to know.

ripita at 2007-7-12 22:48:19 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...