简体   繁体   English

将 Java 数据库结果传递给 JavaScript/PHP 移动网站

[英]Pass Java Database results to JavaScript/PHP mobile websites

We're trying to make a mobile website that will be coded in JavaScript / PHP.我们正在尝试制作一个将使用 JavaScript / PHP 编码的移动网站。 We have a database that is queried and the results are retrieved using java code.我们有一个被查询的数据库,并使用 java 代码检索结果。 How do I pass the results from my java code to the mobile website?如何将结果从我的 java 代码传递到移动网站?

edit - the java connects to the database, queries the results, forms lists and passes it to the php/javascript code, that will display it in the website.编辑- java 连接到数据库,查询结果,形成列表并将其传递给 php/javascript 代码,该代码将在网站中显示它。 There's no actual processing required in the PHP code. PHP 代码中不需要实际处理。 It's more like a bunch of functions in java do the work, while calling PHP modules to display the result in a webpage.它更像是 Java 中的一堆函数来完成工作,同时调用 PHP 模块将结果显示在网页中。

When you say Java, you mean something like WebLogic or TomCat servers?当您说 Java 时,您指的是 WebLogic 或 TomCat 服务器之类的东西吗? I guess it's not the case.我想事实并非如此。 I guess you can host your Java code in one of those servers and create webservices, that will serve data to your frontend PHP servers.我猜您可以在其中一台服务器中托管您的 Java 代码并创建 Web 服务,这将为您的前端 PHP 服务器提供数据。

See http://en.wikipedia.org/wiki/Service-oriented_architecture for the general idea.有关总体思路,请参阅http://en.wikipedia.org/wiki/Service-oriented_architecture

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

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