1

I'm trying to move our application from an old JSF 2.2 version to JSF 3.0 (part of the Jakarta EE 9 platform). In the transition we want to replace the Mojarra implementation of JSF and want to replace it with the standard jakarta.faces-api. In the past we used explicit implementaions of JSF, servlet and other technologies, part of the Java EE specification. Now we want to use the standard-api approach.

I have a problem with a class that don't exist in the standard api but in the Mojarra implementation of JSF, the AbstractTagLibrary. We use a Websphere-Liberty in the newest version, so with activated JSF features the application useses MyFaces.

What i tried so far was to replace the AbractTagLibrary with an own implementation. Bot i got an error that AbractTagLibrary should be of type org.apache.myfaces.view.facelets.tag.AbractTagLibrary.

The AbractTagLibrary is used to create custom EL functions. Like in this article.

My question is, how can i replace the AbstractTagLibrary with the standard jsf-api approach? Is there a good way to approach such a problem?

f_puras
  • 2,521
  • 4
  • 33
  • 38
LukasB
  • 31
  • 5
  • 1
    Why is the application using Mojarra-specific `AbstractTagLibrary` in first place? What problem exactly did it think to solve that way? It should undoubtedly have been solved in another way from the beginning on which is not tight coupled to any API implementation. – BalusC Sep 13 '22 at 12:19
  • I think it was implemented like 10 years ago and i am working on that project since a few months. I can not retrace the decisions that led to the current state. I can only guess. But i think the last few persons working on it did not knew any better. – LukasB Sep 13 '22 at 12:35
  • I did some research within the project, as you suggested. And it's to create custom EL functions, pretty similar to: https://www.seamframework.org/Documentation/CreatingCustomELFunctions.html. – LukasB Sep 13 '22 at 14:16
  • 2
    That's JSF 1.x minded. This is unnecessary since JSF 2.0. Replace by this approach: https://stackoverflow.com/a/7080174 – BalusC Sep 13 '22 at 14:36
  • Thank you for your response. I will replace it! :) – LukasB Sep 13 '22 at 14:41

1 Answers1

0

As BalusC said in his comment, the approach is JSF 1.x minded and can be solved by a JSF 2.0 approach explained here: https://stackoverflow.com/a/7080174.

LukasB
  • 31
  • 5