Path problem

I work with Netbeans IDE:

I created a Folder called “js” in the web-pages folder of my project and inserted there a javascript file.

Now, in a java-file in the source package, i want to call this js file:

but i dont know what src-path i have to insert to reference to this javascript file. i have so much troubles with this path-stuffs. i dont want to put-in the absolute path of the javascript-file like D:/Java/Java Web Tool/src/web/js/bla.js can somebody help me? =) regards andreas ps: sorry about my bad english ;-)

Try this, May be this will help you.

 String prefix = getServletContext().getRealPath("/");


You can also use this. as relative path. or use previous reply post for your queries. It may help you.