`
黑猪王子
  • 浏览: 129928 次
  • 性别: Icon_minigender_1
  • 来自: 云南
社区版块
存档分类
最新评论

Struts 中jsp页面导入.css样式文件的问题

阅读更多

1.可以更改路径为相对路径,在<html>前加入
<% String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";%>

然后改成href=<%=basePage%>css/style.css
2.同样在<html>前加入那句话,然后在<head>标签中加入
<base href=<%=basePath%>>

 

http://www.blogjava.net/alecwen/archive/2007/06/21/125613.html?opt=admin

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics