`

struts1的.do页面无法加载外部的js文件

JSP 
阅读更多

很明显是因为你路径没对三。
主要看你的a.jsp放在那个地方的,然后根据*.do的相对路径来指定,
或者你可以加一个:<base href="<%=basePath%>">在<head>标签里面,<%=basePath%>的值是:
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

试试看。

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics