在ssm框架页面跳转过程中,如果出现jsp页面中js和jQuery样式不能使用,应把相对路径更改为绝对路径,方式如下:
在头文件中加上:
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"?/"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
head标签中加上:
ssm框架跳转jsp页面后js或jQuery样式不能使用的问题
最新推荐文章于 2023-05-30 17:24:12 发布