Relative/Absolute path question

Z

zidered

My directory structure is as follows -

WEB-INF
|-----images
|-----buttons
|-----jsp

savechanges.gif is in the buttons directory.

In the jsp directory I have a jsp file with this line in

<img src="images/buttons/savechanges.gif">

When the jsp file is deployed on my webserver (tomcat 5 or Weblogic 8.1) the
image is displayed in the browser correctly.

But to get it to show in a package such as Dreamweaver the path has to look
like this "/images/buttons/savechanges.gif" with an
initial "/" - I do understand the difference between absolute/relative paths
but just can't see why this should be!

With the "/" in front it stops displaying in the browser!

Any ideas? - probably something really stupid I'm missing!

thanks

harry
 
L

lostinspace

----- Original Message -----
From: "zidered" <>
Newsgroups: alt.html
Sent: Wednesday, August 18, 2004 8:52 AM
Subject: Relative/Absolute path question

My directory structure is as follows -

WEB-INF
|-----images
|-----buttons
|-----jsp

savechanges.gif is in the buttons directory.

In the jsp directory I have a jsp file with this line in

<img src="images/buttons/savechanges.gif">

When the jsp file is deployed on my webserver (tomcat 5 or Weblogic 8.1) the
image is displayed in the browser correctly.

But to get it to show in a package such as Dreamweaver the path has to look
like this "/images/buttons/savechanges.gif" with an
initial "/" - I do understand the difference between absolute/relative paths
but just can't see why this should be!

With the "/" in front it stops displaying in the browser!

Any ideas? - probably something really stupid I'm missing!

thanks

harry

Actually (as per the directory structure you provided,) if your working in
the "jsp directory" the correct path for the example you provide would be
".. /images/buttons/savechanges.gif"

If you were in your root directory WEB-INF (higher than either jsp or
images) the link would then be "images/buttons/savechanges.gif".

In the event you were in a sub-directory of the jsp, perhaps "jsp/sib-jsp"
than the relative path would be "../../images/buttons/savechanges.gif".
 
Z

zidered

thanks for that, got my thinking now, perhaps its the web server setup thats
wrong - cheers!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top