• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

problem while using tagdir

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 826
Eclipse IDE Oracle Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which IDE are you using ?
 
Srikanth Nutigattu
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Eclipse IDE Oracle Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic