连接Java applet与asp.net? [英] Connect java applet with asp.net?

查看:133
本文介绍了连接Java applet与asp.net?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我设计了一个在ASP.net和C#上运行的网站.我想将一些建筑物的草图放到我用Java小程序制作的网站上.我不知道将这些图形(Sketch)与我的站点连接的方式(该站点与SQL Server Management Studio Express设计的数据库连接).当用户登录到该站点时,他会找到一个草图,并且可以对其进行修改,并且在数据库中有一个表格,显示建筑物中有多少个房间和楼层.因此,当用户在Java小程序中修改草图时,网站必须自动修改数据库.网站上的任何修改都必须修改数据库.

请帮帮我!
如何将Java applet与ASP.net和数据库连接?

在此先谢谢您!

I designed a site running on ASP.net & C#. I want to put the sketch of some buildings to my website which I made with a Java applet. I do not know the way to connect these graphics (Sketch) with my site (the site is connected with database which is designed by SQL Server Management Studio Express). When the user logs onto the site he will find a sketch and he can modify it and in the database there is table about how many rooms and floors there are in the building. So when the user modifies the sketch in the java applet, the website must modify the database automatically. Any modification on the website must be modify the database.

Please help me!
How am I to to connect the Java applet with ASP.net and the database?

Thanks in advance!

推荐答案

解决方案的关键是Java与Javascript的通信.在CP上有一篇很棒的文章,您可以在这里找到: Java到JavaScript的通信 [ ^ ].
Javascript可以调用Java applet代码,而Java applet代码可以在浏览器中调用Javascript.通过使用Ajax技术,这将使您的applet与ASP.net网站进行有效的通信:

Java Applet --Call-> Javascript --Ajax-> ASP.net网站

Ajax回调-Ajax-> Javascript --Call-> Java小程序

这仅描述了从Applet到网站并再次返回的完整往返过程.


另请参见此网站: http://www.raditha.com/java/javascript.php [ ^ ]它将为您提供有关如何实现确切目标的示例想要.
[/编辑]

最好的问候,

-MRB
The key to your solution is called Java to Javascript communication. There is a great article here on CP which you''ll find here: Java to JavaScript Communication[^].
Javascript can call into Java applet code and the Java applet code can invoke Javascript in your browswer. By utilizing Ajax technology this will allow for your applet to effectively communicate with your ASP.net website:

Java Applet --Call--> Javascript --Ajax--> ASP.net website

Ajax Callback --Ajax-> Javascript --Call--> Java applet

This just about describes a full round trip from your applet to your website and back again.


Please see also this website: http://www.raditha.com/java/javascript.php[^] it will provide you with samples on how to achieve exactly what you want.
[/Edit]

Best Regards,

-MRB


这篇关于连接Java applet与asp.net?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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