English 中文(简体)
NetBeans IDE 6.9.1的玻璃鱼服务器在试图展示电文箱时停止了工作。
原标题:The Glassfish Server in NetBeans IDE 6.9.1 stopped working when an attempt was made to display a message box

Im与法国统计局网络应用合作。 自2006年以来 Java不支持以直接方式在网络应用中展示信息箱,我决定尝试一些新的想法,认为应当尝试在常规桌面应用中显示信息箱的方法。 为了简单起见,我在Java Servlet.上尝试了以下方法。

JOptionPane.showMessageDialog(null, "A message from Java Servlet.");

without expecting that it would work but it indeed worked and a message appeared on the web browser! I felt that I had found something new but also found that the Glassfish server in my NetBeans 6.9.1 had stopped working in two or three attempts. It turned off with no warning , no error and no exception at all!


The screen shot can be seen below.A message displayed by Servlet


Now, if the use of this method in Java web is illegal, it should not be allowed to use this method at all in Java web and some errors or exceptions should be raised when an attempt is made to do so. It should be a compile-time error and if it is so then, how did the message appear through Java Servlet on the web browser? and also, Why did the Glassfish server stop working?

最佳回答

我不知道为什么玻璃鱼被停下来,我猜测,这正是在这种背景中沉积的Swaing/AWT深线所造成的。 在Java EE网络应用中,人工穿透(未经管理)深层的观念总是极为坏。 一旦请求结束,你就会失去控制。 您必须收集会议或申请范围上的线索,最好是在经过适当清理或申请销毁/缩小的集合中。

但是,这一信息是实际上的,不是由网络浏览器,而是由网络服务器展示的。 这意味着,只有在网络服务器和网络浏览器都在上运行时,你的意图才会有效。 很明显,如果你在万维网上将网站公布为生产环境,用户利用实际不同的机器访问。

所有网络浏览器的检索和投递只是简单的超文本/CSS/Java文本。 在共同论坛中,您需要Java sgust alert(>,confirm(, 等,或仅仅是一些立场已绝对的<&codelt;d>,如果你感到对谷物实行更严格的控制,则需对 be。 http://www.primefaces.org/showcase/uis/dialog.jsf"rel=“nofollow”

If you really need to run Swing/AWT in a web application for some reason, then you should rather be creating an applet instead and ultimately embed it in your web page by HTML <applet> or <object> tag. This will be downloaded from the server to the client and executed in the client s environment.

问题回答

暂无回答




相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...