You can do this with a relative path. In other words, don't start it
with a "/". For example, I have an application myapp in
$TOMCAT_HOME/webapps/myapp. If a JSP in myapp requests a Javascript,
image, or anything else in the same directory, it's just '<script
language="JavaScript1.3" src="./myscript.js">' or '<script
language="JavaScript1.3" src="myscript.js">'. If the requesting JSP was
in a lower diretory, say myapp/test, the I use '<script
language="JavaScript1.3" src="../myscript.js">'
Ramesh Yerneni wrote:
> Can someone tell how to provide location of a file without giving
> complete path in jsp?
> I am including javascript file in jsp for validations. I couldn't get
> it to work unless if I give the complete path which is what I am
> trying to avoid. TIA
> ...
-------------------------------------------------------------------------
Thad Humphries "...no religious test shall ever be required
Web Development Manager as a qualification to any office or public
Phone: 540/675-3015, x225 trust under the United States." -Article VI