日期:2014-05-17  浏览次数:20589 次

struts2 Action跳转到jsp页面css失效的解决办法
页面转跳失效问题肯定是路径的问题。建议改相对路径为绝对路径

??? String path = request.getContextPath();?
??? String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";?

<link rel="stylesheet" type="text/css" href="<%=basePath%>相对路径/main.css">