从JavaScript到Java保存用户详细信息 [英] Save user details from javascript into java

查看:162
本文介绍了从JavaScript到Java保存用户详细信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的情况:

我保存在我的移动网站,我使用KWS让我的手机作为服务器着,当然,当我打开移动热点。

I have a website stored in my mobile, I'm using "kws" to make my mobile as server, ofcourse when i turn on the hotspot in the mobile.


  • 当一个用户将连接到我的热点,他将键入唯一的IP和端口号,然后输入到我的网站。

  • When an user will connect to my hotspot he will type unique ip and port and then enter to my website.

在我的网站上有地方留下详细内容(电子邮件,电话号码,姓名等)。

In my website there is place to leave details (email,phone number, name, etc..).

其实我是想借此详细信息,并将其发送到java Android程序是管理网站(我创建的Andr​​oid应用这种移动的管理网站,她打开/关闭,等热点)。

I actually want to take this details and send it to the java android program that is manages the website (i built android app to this mobile that manage the site, she switch the hotspot on/off ,etc..).

在Java的code我想了解详细内容,并将其写入到文件或他们为了将其发送至特定的电子邮件时,我将能够连接到互联网写信给我的SQLite数据库(当我连接互联网我关掉热点,该网站是不活跃了。)

In the java code I want to get the details and write them to file or write them to my sqlite database in order to send it to specific email when i will be able to connect to the internet (when i connect to internet i turn off hotspot and the site isn't active anymore.)

它需要支持的浏览器包括:IE浏览器,浏览器,火狐

The browsers it needs to support are: Internet Explorer, Chrome, Firefox.

我该怎么办呢?不forgett,我有唯一的连接是移动的热点。

How can i do it? don't forgett that the only connection i have is the hotspot in the mobile.

推荐答案

确定,因此要解决,我用的WebSockets。现在我可以从JavaScript数据传递到Java。
我用这个:编写的WebSocket服务器

OK, so to solve that i used Websockets. Now i can pass data from javascript to java. I used this: Writing a WebSocket Server.

这篇关于从JavaScript到Java保存用户详细信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆