简体   繁体   English

我可以同时使用JSF 2.2和Restful吗?

[英]Can i work in the same time with JSF 2.2 and Restful?

I'm already working with JSF 2.2 and java beans and EJB3 (CDI and not seam framwork). 我已经在使用JSF 2.2,Java Bean和EJB3(CDI,而不是接缝框架)。 I learned how to use JaxRS Restful and i want to khnow If I can improve my projects by using this technology with my JSF pages? 我了解了如何使用JaxRS Restful,并且想知道是否可以通过在JSF页面上使用此技术来改善项目? JSF works only with one servlet and to use restful I have to add another servlet in the web.xml file? JSF仅与一个servlet一起使用,要使用Restful,我必须在web.xml文件中添加另一个servlet吗?

You can add as many Servlets as you want to your JavaEE web project. 您可以根据需要向JavaEE Web项目添加任意数量的Servlet。

You could either add another servlet to the web.xml file, or use annotations. 您可以将另一个servlet添加到web.xml文件,或使用批注。 I suggest you check out the Oracle JavaEE tutorials for examples. 我建议您查看Oracle JavaEE教程中的示例。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM