简体   繁体   English

通讯Android客户端和JSF服务器

[英]Communicating Android Client and JSF server

I am new in JSF and I am starting an application with se following architecture: 我是JSF的新手,并且正在使用以下体系结构来启动应用程序:

  • JSF Server JSF服务器
  • Android Client Android客户端

Some functionalities will be common in Android and JSF (web pages), only the interface will change. 某些功能在Android和JSF(网页)中很常见,只有界面会改变。

I know how to communicate an Android client with a servlet, but I don't know how to do it with a JSF server. 我知道如何通过Servlet来通信Android客户端,但是我不知道如何通过JSF服务器来实现。 I have searched a lot in web, but nothing was found. 我在网络上搜索了很多东西,但是什么也没找到。

Can someone help me? 有人能帮我吗?

JSF is a framework that deals with UI generation (HTML). JSF是处理UI生成(HTML)的框架。 It is not a "server", but a tool that you can use in a server and that many server offer with its default instalation. 它不是“服务器”,而是可以在服务器中使用的工具,并且许多服务器都以其默认安装方式提供该工具。 In fact, it works on top of servlets. 实际上,它可以在servlet之上运行。

Given that is HTML, its use would make sense only when you are using an HTML client (web browser). 既然是HTML,则只有在使用HTML客户端(Web浏览器)时才有意义。 If you are using an android app, you will be better off using messaging frameworks (vg, SOAP and WS, or directly servlets. You can use bare servlets together with JSF just by mapping the servlets to URLs that do not collide with the JSF ones (if you recall JSF configuration, what you tell the webserver is which URLs will be served by the JSF servlet). 如果您使用的是Android应用程序,则最好使用消息传递框架(vg,SOAP和WS或直接使用servlet。将裸servlet与JSF一起使用,只需将servlet映射到不会与JSF冲突的URL即可。 (如果您回想起JSF配置,则告诉Web服务器的是JSF Servlet将提供哪些URL)。

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

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