html选取服务器文件路径,获取服务器文件路径(Gets the server file path).doc

没有检索到摘要

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

获取服务器文件路径(Gets the server file path)

获取服务器文件路径(Gets the server file path)

1. understanding of basic concepts

Absolute path: absolute path is the file or directory on your home page, the real path on the hard disk, (URL and physical path), for example:

C:\xyz\test.txt represents the absolute path of the test.txt file. Http:///index.htm also stands for one

URL absolute path.

Relative path: the path relative to a base directory. Contains the relative path of Web (relative directory in HTML), for example: in

In Servlet, "/" represents the directory of the Web application. The relative representation of the physical path. For example: "/" represents the current directory,

"/" represents the parent directory. Such a representation is also a relative path.

Also, for URI, URL, URN, and so on, see the RFC related documentation standards.

RFC, 2396:, Uniform, Resource, Identifiers (URI): Generic, Syntax,

(/rfc/rfc2396.txt)

2. relative paths and absolute paths in JSP/Servlet.

2.1 server-side address

The relative address of the server refers to the address relative to your web application, which is parsed at the server side

(unlike the relative addresses in HTML and JavaScript, they are parsed by the client browser), that is to say, this time

The relative address in JSP and servlet should be relative to your web application, that is, relative to /webapp/.

Where it is used:

Request.getRequestDispatcher (address) in forward:servlet; this address is

Parsed on the server side, so you should write it from forward to a.jsp:

Request.getRequestDispatcher ("/user/a.jsp") this / applies webapp relative to the current web,

Its absolute address is: /webapp/user/a.jsp.

SendRedirect:

2.22, client address

All the relative addresses in the HTML page are relative to the server root directory (/),

Instead of (with the directory of the Web application directory) /webapp/.

The action attribute of the form form in Html should be relative to the server root directory (/),

So, if sub

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值