2014-12-24 133 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> 
...