0

I am trying to migrate a project which has been working of JSF1.2 to JSF2.1 and have succeeded in doing so ,now we want to use bootsfaces1.0.2 in the project to enhance look and feel of the application. Our codebase is pretty old and we want to stick to JSP to avoid complexity and time needed to migrate to facelets

When I checked bootsfaces-b.taglib.xml file under META-INF of bootsfaces-1.0.2.jar, it basically uses facelets tag library http://java.sun.com/xml/ns/javaee/web-facelettaglibrary_2_0.xsd"

We include the bootsfaces tag lib <%@ taglib uri="http://bootsfaces.net/ui" prefix="b" %> and it was failing , so I manually created a tld file which points to jsp tag library and changed the tag structure to be compliant with jsp 2.1 tag library , here is the stacktrace of exception I get

PWC6197: An error occurred at line: 28 in the jsp file: /jsp/login/login2.jsp PWC6199: Generated servlet error: method get in class org.apache.jasper.runtime.TagHandlerPool cannot be applied to given types; required: java.lang.Class found: java.lang.Class reason: inferred type does not conform to upper bound(s) inferred: net.bootsfaces.component.inputText.InputText upper bound(s): javax.servlet.jsp.tagext.JspTag

PWC6197: An error occurred at line: 28 in the jsp file: /jsp/login/login2.jsp PWC6199: Generated servlet error: cannot find symbol symbol: method setPageContext(javax.servlet.jsp.PageContext) location: variable _jspx_th_b_inputText_0 of type net.bootsfaces.component.inputText.InputText

It seems the tag library is expecting a servlet , but bootfaces would supply a facelet component instead,

Has anyone tried to run bootsfaces on jsf2.1/Jsp ,can you provide me any suggestions on this.

Thanks, Santosh

  • I think it would be a good idea to present a reproducer. What precisely did you do, and what does not work? I know that you've tried to describe the problem as good as possible, but I still don't get it. If I get you right (and that's a big "if"), you've got a mixture of good old JSP code and JSF 2.1 tags. Is this correct? – Stephan Rauh Mar 15 '17 at 23:20
  • Another strategy is to start with one of your demo projects and to add you code until it fails. This way, you can tell us (the BootsFaces team) which features are broken. – Stephan Rauh Mar 15 '17 at 23:21
  • Hey Stephan , Yeah we are trying to use the bootfaces with old JSP code and JSF tags I have just added all the context in a new question , so that it can be understood better. stackoverflow.com/questions/42833655/ – Santosh San Mar 16 '17 at 18:38
  • Yes, the clarification helped me a lot to understand your challenge. I don't think you can avoid translating the JSP files one-by-one, but I've collected a few ideas in the other question. Maybe one of the ideas works. The alternative - converting 1500 files - is a lot of work. Good luck! – Stephan Rauh Mar 16 '17 at 20:24

0 Answers0