Just starting out with jsp and using Glassfish server via netbeans. Struggling to link my jsp file with css and javascripts. Below is the structure of my files:
Web Pages
--Web-Inf
--assets
--css
--style.css
--js
--jquery.js
--includes
--header.jsp
--footer.jsp
--sidebar.jsp
--pages
--home.jsp
--index.jsp
This is the code in my index.jsp file:
<%@include file="includes/header.jsp" %>
<%
if (request.getParameter("page") == null) {
%>
<%@include file="pages/home.jsp" %>
<%
} else {
%>
<%
}
%>
<%@include file="includes/sidebar.jsp" %>
</div>
<!--Latest end-->
<%@include file="includes/footer.jsp" %>
And this is the code in my header.jsp file:
<link href="${pageContext.request.contextPath}/assets/css/bootstrap.min.css" rel="stylesheet">