473,386 Members | 1,908 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

absolute path and relative path in URL

dmjpro
2,476 2GB
if i start a URL as / .... what does it mean?????

i know .... ./ it is starting from current directory.
plz help.

kind regards.
dmjpro.
May 22 '07 #1
4 12709
sumittyagi
202 Expert 100+
if i start a URL as / .... what does it mean?????

i know .... ./ it is starting from current directory.
plz help.

kind regards.
dmjpro.
in file system that means root drive. in web applications, while forwarding requests it means root of application.
May 22 '07 #2
dmjpro
2,476 2GB
thanks for ur reply sumittyagi

suppose my application server (Apache installed) in WINDOWS.
and i set the HTML root directory d:/deb_web/ ... right.
and the web_site_name is .... suppose ....... http://DEB_DMJ_WEB/
if i write now http://DEB_DMJ_WEB/jsp/test.jsp
the absolute path on the server will be d:/deb_web/jsp/test.jsp ... right.


now if write in a page .... <a href = "/jsp/test.jsp">Click Me</a> can it reach to the requested file????


actually what happens to me .... when i write this then apache home path is considered...

plz help.

kind regards.
dmjpro.
May 22 '07 #3
sumittyagi
202 Expert 100+
thanks for ur reply sumittyagi

suppose my application server (Apache installed) in WINDOWS.
and i set the HTML root directory d:/deb_web/ ... right.
and the web_site_name is .... suppose ....... http://DEB_DMJ_WEB/
if i write now http://DEB_DMJ_WEB/jsp/test.jsp
the absolute path on the server will be d:/deb_web/jsp/test.jsp ... right.


now if write in a page .... <a href = "/jsp/test.jsp">Click Me</a> can it reach to the requested file????


actually what happens to me .... when i write this then apache home path is considered...

plz help.

kind regards.
dmjpro.
see, at client side the root is your web server, and at server side root is your application which is running on that server.
so whenever you set href of anchor tags or actions of form tags etc then your root will be http://websitename.
and whenever you forward requests by request dispatcher then your root will be your servlet context, i.e. web application.
May 24 '07 #4
dmjpro
2,476 2GB
very interesting ...... sumittyagi

now the picture is more clearer.
thanks.

kind regards.
dmjpro.
May 24 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Joe Cybernet | last post by:
Is there any function for combining an absolute and a relative URL to result in an absolute URL? Like if I have http://www.domain.com and "../images/1.jpeg" it will evaluate to...
3
by: Peter Taurins | last post by:
Hi there. I have an included file (header.php) that contanis a reference to a graphic. If I stay at the root level, then I can control the relative path of the image. eg. images/imagename.jpg ...
3
by: rajuvk | last post by:
I am setting up a website with a number of folders like: / (the document root) /user /admin/ /content in the /user folder there is a flie "userlogged.php", which I want to include in every...
9
by: Stuart | last post by:
Hi All, I got a challenge to make the same APS/Script/Html run on different web roots. I can not use relative pathing in a lot of cases. We use lots of included files so depending on where that...
15
by: Nick K. | last post by:
I recently began maintenance work on a production web server that is located in the root directory of a web server. I moved this into a sub web on my local web server in order to do work on it. I...
4
by: Vitali Gontsharuk | last post by:
Hallo! When using the XPATH document() function to load a new XML document, we are coming across problems, because XALAN seems to have problems with absolute paths. XALAN always assumes that the...
7
by: Rizaan Jappie | last post by:
is it possible to get the relative path based on a absolute path in c#? *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it!
19
by: Jerry M. Gartner | last post by:
Greetings: What is the best way to resolve paths within a document regardless of what path it is opened under? For example: I have x.php and it contains <img src="images...">, (amongst other...
6
by: Jon Slaughter | last post by:
do I have to prefix every absolute path with document root to get it to work? For some reason I thought that prefixing a path with '/' or './' with make it absolute w.r.t to document root but I...
13
by: Nathan Sokalski | last post by:
I have a page in my site that I need the absolute url of. Is there a function in .NET to which you can pass a relative url or something such as "~/mydirectory/mypage.aspx" which will return an...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.