This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem while using tagdir

 
Vamsi Krishna Kalpuri
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am unable to use the Tag files. The below is the code and the error message.

hello.jsp:

<%@ taglib prefix="box" tagdir= "/WEB-INF/tags" %>

<HTML>
<HEAD>
<TITLE>Hello Tag</TITLE>
</HEAD>
<BODY>
<box:Header/>
</BODY>
</HTML>


Header.tag in the WEB-INF/tags :

<strong> Hi </strong>

the error that i am getting is

/Hello.jsp(12,0) No tag "Header" defined in tag library imported with prefix "box"


can you please help me. Thank you
 
Srikanth Nutigattu
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nothing seems to be wrong in your code or the tagdir you have specified. I have verified and it is working for me.

check the following

1. The extension is "Header.tag" (case-sensitive)
2. You have placed the tag file under "WEB-INF/tags" of the same application (it may happen sometimes )

apart from that I can't see any problem
 
sudipto shekhar
Ranch Hand
Posts: 826
Chrome Eclipse IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which IDE are you using ?
 
Srikanth Nutigattu
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is not IDE dependent,
Just a straight code would suffice.



head.tag


It is working fine using tomcat 5.
 
sudipto shekhar
Ranch Hand
Posts: 826
Chrome Eclipse IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If an IDE is being used then where you place your tag files is very important.
Like in eclipse you have to place the .tld file under the TLDs directory under WEB-INF in contrast to what is said that .tld file can be placed directly under WEB-INF of the context-root.
Hence placing the tag files are important as the TAG files could not be found by the container.

So make sure you have placed your tag files under the correct directory structure according to the IDE you are using.
 
Vamsi Krishna Kalpuri
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot. The example you have given is working fine and also i had tried the old one, now its working fine.

Thank you once again.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic