我在eclipse的jsp文件中有问题,我想在eclipse中包含一个文件“register.js”(路径:WEB-INF / js / register.js),但是js不能正常工作。我在基本的html页面中尝试了相同的代码,但它运行良好。 我的引导程序文件位于WEB-INF / bootstrap / js / register.js
中register.jsp:
<jsp:include page="include.jsp" />
<script src="js/register.js" type= "text/javascript"></script>
include.jsp:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<style type="text/css">
<%@include file="bootstrap/css/bootstrap.css" %>
<%@include file="bootstrap/css/bootstrap-theme.css" %>
</style>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="bootstrap/js/jquery.js"></script>
<script src="bootstrap/js/bootstrap.js"></script>
</head>
<body>
</body>
</html>
我尝试为register.js和bootstrap脚本编写类似的内容,但它不起作用:&lt;%@ include file =“js / register.js”%&gt;
你有什么想法吗?