• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

diff betweeb tag & tagx files

 
bernard savary
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,
I created a tag file called header.tagx (HF says tagx extn is valid ), below is the contents:
<%@ attribute name="name" %>
<h1>Welcome ${name}</h1>
When I call this from a jsp , I get the error :
java.lang.RuntimeException: org.apache.jasper.JasperException: /WEB-INF/tags/Header.tagx(1,2) The markup in the document preceding the root element must be well-formed.

But the same tag file if I rename to header.tag , it works with any problem. Can someone tell whats the difference ?
thanks!
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
tagx, as well as jspx files, are XML documents which must follow the XML syntax. You'll find more information about tagx files in the JSP specification : JSP.8.6 Tag Files in XML Syntax
 
bernard savary
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks a lot !
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic