8

I would like to use a JSP tag library supplied by a different (not IBM) software company with XPages. Is this possible? If you can, how can I associate the new jar file to the tag library namespace so it would be recognized?

DarkAjax
  • 15,175
  • 11
  • 52
  • 65

1 Answers1

2

I highly doubt it. In all likelihood, the library would have to be converted to a JSF component library. There are some similarities between the syntax used to define each, but the primary difference is that JSP uses a single Java class known as a tag handler to both define the nature of an object (i.e. its properties) and to send markup to the browser that is representative of the object state. In contrast, JSF uses two: the component and the renderer. The component is just the identity of the object; the renderer handles the markup generation. A subtler difference is that JSP tag libraries are by convention stored as .tld files, which are then referenced from within the JSP page; XPages expect components to be defined in .xsp-config files and renderers to be defined in faces-config.xml files. If a component is properly defined (even if its corresponding renderer is not), Designer will recognize the prefix:tag syntax on any page at build time and generate the appropriate Java code. Otherwise, Designer rejects the tag as invalid and refuses to build the project.

In summary, JSP tag libraries are, to my knowledge, not natively consumable in XPage apps, but can be used as a basis for creating JSF component libraries that can be consumed in any XPage app.

Tim Tripcony
  • 8,036
  • 1
  • 21
  • 34
  • The interesting question: There are [several JSF libraries](http://www.jsfmatrix.net/) out there. Could we use those? – stwissel Dec 22 '12 at 01:31