we made a HTML5 mobile app, & now we are creating a IOS native App. We want the IOS app to call methods on the Java servlet (with stripes) (running the HTML5 App) so that we can use the same behind-the-scenes logic. Do we need to setup a web service to do this?

I.E we would like to just call the existing Stripes action beans from IOS (as they are already set up to receive ajax requests, but will this violate the cross-domain law)?

Thanks!

有帮助吗?

解决方案

Cross-domain isn't an issue if you're making requests from a native app, so it should be possible to make requests to your AJAX ActionBeans directly.

其他提示

You can directly call the logic by using API and get the response. Do servlet mapping to the url pattern you need. then in servlet extend the HttpServlet and override doGet and doPost method, which has HttpServletRequest and HttpServletResponse as input parameters, which can be used to communicate with your mobile app.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top