博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
在jsp的include标签中使用绝对和相对路径
阅读量:4223 次
发布时间:2019-05-26

本文共 435 字,大约阅读时间需要 1 分钟。

jsp中的include标签可以使用相对路径和绝对路径,区别在于路径的第一个字符是否为"/",例如:
假设有如下web路径:
webRoot
├ [jsp]
│ │
│ │
│ ├ [subFolder]
│ │ │
│ │ subFile.jsp
│ │ │
│ │
│ myPage1.jsp
│ mypage2.jsp
│ │
│ │
global.jsp
相对路径
<%@include file="subFolder/subFile.jsp"%> <%@include file="./myPage2.jsp"%> <%@include file="../global.jsp"%>
绝对路径
<%@include file="/global.jsp"%> <%@include file="/jsp/myPage1.jsp"%> <%@include file="/jsp/subFolder/subFile.jsp"%>

转载地址:http://xygmi.baihongyu.com/

你可能感兴趣的文章
UVM:7.7.1 使用reg_predictor
查看>>
UVM:7.7.2 使用UVM_PREDICT_DIRECT功能与mirror 操作
查看>>
UVM:7.7.3 寄存器模型的随机化与update
查看>>
UVM:7.7.4 扩展位宽
查看>>
UVM:7.8.1 get_root_blocks
查看>>
UVM:7.8.2 get_reg_by_offset 函数
查看>>
UVM:8.2.2 重载的方式及种类
查看>>
UVM:8.2.3 复杂的重载
查看>>
UVM:8.2.4 factory 机制的调试
查看>>
UVM:8.3.1 重载transaction
查看>>
UVM:8.3.2 重载sequence
查看>>
leetcode171.[math] Excel Sheet Column Number
查看>>
Log4j配置
查看>>
java发送https请求
查看>>
java发送https请求证书问题
查看>>
js新消息提醒
查看>>
js窗体消息提醒
查看>>
深入Hibernate映射文件(二)——<hibernate-mapping>的属性
查看>>
详解在Spring中进行集成测试
查看>>
Struts2中过滤器和拦截器的区别
查看>>