문제

My project structure in eclipse -

enter image description here

Header.tag -

<%@ taglib prefix="myTags" tagdir="/WEB-INF/tags"%>
<html>
<head>
</head>
<body>
<img src="../images/java_logo.gif"><br>
</body>
</html>

MyTagUser.jsp -

<html>
<head>
</head>
<body>
<myTags:Header/>
Java is awesome !
</body>
</html>

Output is 'Java is awesome'. No image or image placeholder is displayed. What is my mistake ?

도움이 되었습니까?

해결책

The <%@ taglib %> directive has to go in the JSP that calls out to the tag, so that it knows where to find it. Not in the tag itself (unless that tag itself uses other tags).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top