2014-12-24 94 views

回答

0

JSP页面只是服务器代码HTML,你不能用脚本标签

<script src=bootstra.js></script> 
+1

我做了添加JS这但它不包括在内。树状结构是WEB-INF/bootstrap/dist/js/bootstrap.js。 –

+0

你可以发布你的jsp吗? – giannisf

+0

工作完成:-)! –

1

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> 
<!--[if lt IE 9]> 
    <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> 
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> 
<![endif]--> 
</head> 
<body> 
</body> 
</html> 

register.jsp

<!DOCTYPE html> 
<html> 
<head> 
<jsp:include page="include.jsp" /> 
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> 
<style type="text/css"> 
    <%@include file="css/register.css" %> 
</style> 
<script src="js/register.js"></script> 
<title>Register</title> 
</head> 
<body> 
...