How to Include Image tag in JSPF file
-
14-11-2019 - |
Question
I want to image to be included in "usermenu.jspf file which is then included in main flat_status.jsp file
<tr title="Apply Here">
<td height="41" style="cursor:pointer"><img src="<%=request.getContextPath()%>/images/user_manager.jpg" width="38" height="41"></td>
<td height="41" class="leftPanel">Apply Here</td>
</tr>
I have used following tag to include JSPF file in Main JSP file
<jsp:include page="WEB-INF/jspf/usermenu.jspf"></jsp:include>
I hv tried this one bt it doesnt work...can anyone help me out...???
Here is Screen shot for my files directory
Solution
Try a relative path
<img src="../images/user_manager.jpg"
since your images folder is one level above your jspf file . Check out this link .
OTHER TIPS
if you are using <jsp:include page="...."></jsp:include>
you have to give file extension as .jsp insted of the .jspf
or you can use <%@ include file="...." %>
instead of the jsp:include ..
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow