CDI / JSF and JAX-RS?

I would like to use RESTful services in a CDI / JSF2 application. I am not very familiar with JAX-RS, but I read that its life cycle does not work very well with CDI / JSF2. Can I enable JAX-RS with CDI / JSF2 on the JEE6 stack? If there are no alternatives?

thank

+3
source share
2 answers

You can use JAX-RS, just fine, next to the JSF application, however they do not play well together. For example, you cannot use JAX-RS for http: // localhost: 8080 / story / 92 / "to return a JSF page with a Story with ID 92.

PrettyFaces, - .

JAX-RS , JSF. " http://localhost:8080/story.xml" JAX-RS.

+6

JSF. , http://localhost:8080/services/, JSF http://localhost:8080/index.xhtml. - javascript JSF. REST, . JSF REST, .

+3
source

Source: https://habr.com/ru/post/1748852/


All Articles