1、如果html的代码加到jsp,而且引用的css。js文件,容易出现问题,要有正确的路径
<% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %> <base href="<%=basePath%>"> <link rel="stylesheet" href="css/Cjcx.css" type="text/css" /> <script src="js/jQuery.js"></script>
Done!