I have created a view and its working well but i now need to Include another JSP inside the page.
Considering my views are installed in the protected area of WEB-INF/Views (hence its not available in my resources directory where my imgs, css are)
I have tried using
<%@ include file="/views/shared/items/NewItem.jsp" %>
And it always gives me FileNotFound, taking into consideration that my NewItem.jsp is installed with my other views (i.e. NOT accesible via the normal routes but controlled by controllers) how can i include a JSP files that is installed next to my view
If i take out the "include file" my view renders without issues.
I am sure i am missing something here?
Thanks in advance
If NewItem.jsp
is in /WEB-INF/views/shared/items/NewItem.jsp
, then you have to use this path when incuding it:
<%@ include file="/WEB-INF/views/shared/items/NewItem.jsp" %>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With