• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How portable are Custom Tag Libraries?

 
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You have to look at that container's documentation.
reply
    Bookmark Topic Watch Topic
  • New Topic