当前位置:网站首页>Relative path and absolute path
Relative path and absolute path
2022-07-28 06:31:00 【wr_01】
Slashes and dots indicate relative and absolute paths
Absolute path : It's the path from the drive letter
Relative paths : Is the path starting from the current path
/ It's the root directory ( stay Javaweb Can be combined with the absolute path inside the project as a relative path )
./ Is the current directory ( Or start with nothing )
“…/” To represent a higher level directory ,
Absolute path
JavaWeb Relative path in
Relative paths are divided into paths that start with a diagonal bar and paths that do not start with a diagonal bar
- Path starting with diagonal bar : Baseline path ( The root path ) Relative path of
- A path that does not begin with a diagonal bar : The relative path of the current directory
Depending on the location of the file where the path is located , Divided into two : Foreground path and background path .
A、 Foreground reference path
The so-called foreground path refers to , The path contained in the code executed by the browser .
for example ,html、css、js In the path , And jsp The path of the static part in .
image html And jsp In the static part of <img src=" "/>、<a href=" "></a>、<form action=" "></form> etc. ; image css Medium background:img("") etc. ; image js Medium window.location.href=" " etc. , All belong to the foreground path .
The reference path of the foreground path is Web The root path of the server , namely http://127.0.0.1:8080/
B、 Background reference path
The so-called background path refers to , The server parses the executed code and the path contained in the file .
for example ,java The path in the code 、jsp File dynamic part (java Code block ) In the path 、xml Path in file (xml The document is to be java The code is loaded into memory , And by the java Code parsing ) etc. .
The reference path of the background path is Web Root path of application . Such as http://127.0.0.1:8080/primary/ (primary yes Web Applied project name )
HTML and JSP Benchmark difference of relative path
In the default HTML Page and JSP The benchmark of relative path in the page is different .
stay HTML in base The label is used to know the benchmark of the relative path ( default HTML Page does not base label , At this time, the relative path is the path relative to the current page )
stay jsp It automatically adds one to us base Label and specify that the benchmark is the project path , Therefore, the relative path we write in any directory is based on the project path .
边栏推荐
- 小程序:生命周期
- QT custom sliding button (beautiful and easy to use)
- Talking about fluke optical cable certification? What is CFP? What is OFP?
- Low power design -power switch
- ICC2(三)Clock Tree Synthesis
- Perl入门学习(十一)文件操作
- 【学习笔记】编码能力
- Graduation thesis | how to write literature review
- Pytorch learning notes 3 - datasets & dataloaders & transforms
- 【学习笔记】工具
猜你喜欢

Matlab simulation of radar imaging 2 - pulse compression and windowing

Efficient Net_ V2

Filter

How to calibrate dsx2-8000? Calibration process?

Vs code basic configuration and beautification

qt批量操作控件,并设置信号槽

Vscode中,无法打开源文件 “Adafruit_GFX.h“

clickhouse聚合之探索聚合内部机制
![[yolov5] environment construction: win11 + mx450](/img/04/4da9b3748d5f45ef73cffcc48f8609.png)
[yolov5] environment construction: win11 + mx450

Fluke dtx-sfm2 single mode module of a company in Hangzhou - repair case
随机推荐
ConNeXt
mysql join技巧
多个ics日历合并成单个ics日历
一、ffmpeg录制音频为pcm文件
使用wampserver3.2.6时切换中文时造成启动失败
Precautions for EMI design of switching power supply circuit in layout process
PyTorch 学习笔记 1 —— Quick Start
当mysql表从压缩表变成普通表会发生什么
Bag of tricks training convolution network skills
How to use the bit error meter?
Overall understanding of PLC
Find the network address and broadcast address of the host according to the IP address and subnet mask
MySQL join skills
Listener
Introduction to Perl (IX) quotation
Ship detection in SAR image based on yolov5
论文神器 VS Code + LaTex + LaTex Workshop
qt批量操作控件,并设置信号槽
Random life-1
Cronbach’s α?KMO系数?因子载荷?史上最易懂的问卷信效度分析教程!!!(SPSS和AMOS)