java me 中移动应用程序的服务器端

发布于 2024-08-14 16:59:58 字数 168 浏览 2 评论 0原文

我在 java 中制作移动应用程序,我希望在服务器端获取应用程序的一些信息(应用程序中的 xml 文件中不包含太多信息)。

我对服务器没有太多经验,所以我想知道如何处理它。 也许我应该做一些网络服务。

我在 NetBeans 6.7 中工作

提前致谢!

米兰

Im making mobile application in java me and I want to have server side from where Ill get some information for the application (not to have much information in xml file in the application).

I dont have much experience with servers, so I would like to know how to deal with it.
Probably I should make some web services.

Im working in NetBeans 6.7

Thanks in advance!

Milan

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

忆梦 2024-08-21 16:59:58

假设您想坚持使用 Java,我会将您的服务器端实现为一个简单的 Servlet。如果您只想将 XML 文件发送到客户端,我认为使用适当的 Web 服务堆栈可能有点过分,并且会让事情变得过于复杂。

使用这种方法,您的移动应用程序只需与您的 Servlet 建立 HTTP 连接,Servlet 将使用您的 XML 文件进行响应。

事实上,如果它是静态 XML 文件,则不需要任何类型的服务器端代码,任何 Web 服务器就足够了。

Assuming you want to stick with Java, I would implement your server side as a simple Servlet. If all you want to do is send an XML file to the client I think using a proper web services stack is probably overkill and will over complicate things.

Using this approach your mobile app simply makes an HTTP connection to your Servlet, which responds with your XML file.

In fact, if it's a static XML file you don't need any kind of server side code, any web server would suffice.

苍景流年 2024-08-21 16:59:58

Netbeans 可能附带的 Glassfish 应用程序服务器将允许您在本地计算机上运行 Java servlet。

从同一台计算机上运行的 J2ME 模拟器访问它很容易。

从真实移动电话上运行的 MIDlet 访问 servlet 更为复杂。

我建议查看 Google App Engine,以便轻松部署可通过手机访问的测试服务器。

The Glassfish application server that probably comes with Netbeans will let you run a Java servlet on your local computer.

Accessing it from a J2ME emulator running on the same computer is easy.

Accessing a servlet from a MIDlet running on a real mobile phone is more complicated.

I would suggest looking at Google App Engine for easy deployment of a test server that can be accessed from a mobile phone.

人心善变 2024-08-21 16:59:58

我建议您使用 Http Post 而不是 Web 服务。某些移动设备不支持 Web 服务(在 JSR 172 中定义)

I recommend you to use Http Post instead of Web services. Some mobile devices does not support web services (defined in JSR 172)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文