Reputation: 19
I'm trying to create a struts project (CRUD). I refer to this link https://dzone.com/tutorials/java/struts-2/struts-2-example/struts-2-crud-example-1.html
I'd like to integrate JSF to my project and so Primefaces.
After googling, I found that all the examples are created using jsp files to display the form elements.
This Structure is presenting the composition of my project.
So, I have a question: Can I made xhtml
page instead of jsp
page? .
Upvotes: 0
Views: 1617
Reputation: 12505
You seem to think that JSF is similar to taglibs or template libraries - some library that only lives in the presentation layer. It is not so. JSF is a single framework replacing both View and Controller layers known from other frameworks. The integration is so complete (basically, each on-page component contains its own view and its own controller) that those two aspects are unseparable. You cannot just take the view layer from JSF without the controller part. And the controller part requires that JSF has full control over HTTP request.
If you were a real expert on both Struts and JSF, and were actually forced to do it, you could attempt to write code processing a single request with both Struts and JSF frameworks. But there is absolutely nothing to be gained. You would just end up with two paralell ways of doing everything.
Upvotes: 3