|
No. ".." tells it to go up one directory "/" goes back to the server root. "." is the current directory (this made your link look like /mysite/shoppingcart/shopping/home.jsp). It's basically the same rules for moving around the directory tree that you have in a Unix file system. You can do some wacky stuff with ".."'s (and there were plenty of attacks doing this that caused stuff you shouldn't have been able to get to to be displayed) but the best advice is to keep your URI's (this is the URL less the server name and port) expressed in a simple format in your link tags. Matt -----Original Message----- From: web400-bounces+matt.haas=thomson.com@xxxxxxxxxxxx [mailto:web400-bounces+matt.haas=thomson.com@xxxxxxxxxxxx] On Behalf Of Lim Hock-Chai Sent: Tuesday, June 28, 2005 5:28 PM To: Web Enabling the AS400 / iSeries Subject: RE: [WEB400] relative path my problem might be because I only used one "." on the href (./shopping/home.jsp). Will try two ".." and see what happen. does two .. telling the server to go all the way back the the domain? Thanks. -----Original Message----- From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx]On Behalf Of Haas, Matt Sent: Tuesday, June 28, 2005 4:18 PM To: Web Enabling the AS400 / iSeries Subject: RE: [WEB400] relative path /mysite/shopping/home.jsp or ../shopping/home.jsp will work. How URL's work is not changed by any web technology. How you construct links that end up in the HTML is a different story and some packages (like Struts) have tools to make this a little easier. Matt -----Original Message----- From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Lim Hock-Chai Sent: Tuesday, June 28, 2005 5:08 PM To: Web Enabling the AS400 / iSeries Subject: [WEB400] relative path what relative path do I need to specify to make it go all the way back to domain? For example: If I'm in URL: http://localhost:8080/mysite/shoppingcart/view.jsp and in this jsp I have a link that I want to href back to say , http://localhost:8080/mysite/shopping/home.jsp. What do I need to specify in href=?
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.