让样式文件,或js文件的相对路径,变成成绝对路径
2024-09-25 11:07:29
添加两行代码即可
<% String path = request.getContextPath(); String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()+ path + "/";%>
<!DOCTYPE html>
<html>
<head>
<base href="<%=basePath%>">
最新文章
- 四、基于hadoop的nginx访问日志分析---top 10 request
- ASP.NET MVC使用Bootstrap系统(2)——使用Bootstrap CSS和HTML元素
- 栈与队列:refresh的停车场
- cxf(3.1.1) 异常Caused by: java.io.FileNotFoundException: class path resource [META-INF/cxf/cxf-extension-soap.xml]
- 大姨吗向左,美柚向右,女性健康APP路在何方?
- WPF single instance
- Dell R410 broadcom网卡驱动更新失败
- LINQ to SQL 建立实体类
- LeetCode:Rank Scores
- WebStorm 10.0.3安装
- 洛谷 P1967 货车运输
- Unix代码分析
- Why Everyone Should Lift Weights
- hdu 5126 stars (四维偏序,离线,CDQ套CDQ套树状数组)
- webservice接口与HTTP接口学习笔记
- python猜数字(多种实现方法)
- Telnet是什么意思又是什么协议 Telnet有什么作用及功能
- ActiveMQ 高可用集群安装、配置(ZooKeeper + LevelDB)
- 内存耗用:VSS/RSS/PSS/USS
- c# 超长字符串截取固定长度后显示...(超长后面显示点点点) 通用方法