If i understood your question correctly,i think by doing something like this you can get the entire path of the JSP page. From this you can get the physical path.
<script language=javascript> var myURL = window.location.href+""; alert(myURL); </script>
It is not a good practice to rely on this though. If your app is being run directly from a war file, as opposed to an exploded file system, this method will return null.
It's bad form in J2EE for an app to rely on the physical location of it's files.