• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

From HF page 494 ,Using the attributes in Tag file

 
Vishnu Munnangi
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Everyone,

Please go through the following code..
This is from the Contact.jsp
<HTML>
<BODY>
<%@ taglib prefix="myTag" tagdir="/WEB-INF/tags" %>
<myTag:Header subTitle="This will change dynamically" />
<br><br>
This comes after the header.
<br>
This is from Contact.jsp page.<br>
</BODY>
</HTML>

This is from Header.tag
<B> HI Welcome to this page this is the Header Page, <br> which will be displayed in every page. </B><br>
Title: ${subTitle}

When I deployed both of them in the Web-app, (Header.tag in "/WEB-INF/tags)
and typed the url in the Browser, I am getting an error message:
"/Contact.jsp(4,0) Attribute subTitle invalid for tag Header according to TLD"
Can any one explain me What is wrong with the code..

Thanks in advance.
 
Vishnu Munnangi
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Everyone,

I went through the next page and there it is mentioned that you need to give
<%@ attribute name= required= rtexprvalue= %>
in the Header.tag file.

I typed them in my Header.tag file and it worked fine.

Sorry for the trouble.

Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic