• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

How portable are Custom Tag Libraries?

 
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,

I have written this web app with a custom tag and ran it on JBoss successfully. However, when I tried to deploy it to Sun One 7, I'd get an error, saying that it could not parse the tld file. After a lot of research, I deleted the hiphen (-) from the names of the tags in my TLD file. For example, body-content became bodycontent, tag-class became tagclass and so on. And that solved my deploying to Sun One 7 problem. However, at runtime, when I try to access a jsp that uses my tag library, I get the error:
XML parsing error on file /WEB-INF/siwcc-formato.tld: (line 6, col -1): Element "taglib" does not allow "tlibversion" here.'

But on JBoss it runs smoothly. Is that a bug on Sun One 7 or does each application server have its own spec of Tag Library Descriptors?
This is what my TLD file looks like:

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE taglib
PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
"http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
<taglib>
<tlibversion>1.0</tlibversion>
<jspversion>1.2</jspversion>
<shortname>formato</shortname>
<uri>http://www.caixa.gov.br/siwcc/formato</uri>;
<info>TagLibs bla bla</info>
<tag>
<name>auxTr</name>
<tagclass>br.gov.caixa.bsb.siwcc.web.tag.formato.AuxTrTag</tagclass>
<bodycontent>empty</bodycontent>
</tag>
</taglib>

p.s. Is there a Java/J2EE Application Migration forum?

Thanks in advance for any help.
 
Marshal
Posts: 67279
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Henrique Ordine:
or does each application server have its own spec of Tag Library Descriptors?



No, there is just one format that is specified by the JSP Specification.

But, each version of JSP has made changes to that format. So it sounds like your two servers are running different versions of JSP.
[ April 11, 2007: Message edited by: Bear Bibeault ]
 
Bear Bibeault
Marshal
Posts: 67279
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is an example lifted from a JSP 2.0-compliant TLD:


[ April 11, 2007: Message edited by: Bear Bibeault ]
 
Henrique Ordine
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the response, Bear.
If it's not too much to ask, do you know how I can tell which version of JSP and EJB a container supports?
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have to look at that container's documentation.
 
The harder you work, the luckier you get. This tiny ad brings luck - just not good luck or bad luck.
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!