0
点赞
收藏
分享

微信扫一扫

JSP通过action跳转时css和js和swf无法加载问题

每次通过形如​​http://localhost:8080/1101/indexShow.action​​访问indexShow.jsp时,

加载在jsp里面的css、js、swf都不显示或不起作用。

解决办法:将里面的相对路径全部换成绝对路径。

例如加载<link href="css/common.css" rel="stylesheet" type="text/css" />时,将其换成

<link href="http://localhost:8080/1101/news/css/common.css" rel="stylesheet" type="text/css" />

这种形式,就可以了

举报

相关推荐

0 条评论