本文介绍了制作Web表单:Java与HTML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是编程新手,这个问题可能真的很愚蠢,但我仍然想问,因为我不知道哪些做法是可行的,哪些不可行。你看,现在我正在学习基本的J2EE。我们的任务是使用JSP和servlet创建一个基于Web的应用程序。我的问题之一就是做表单。

I am new in programming and this question may really be stupid but I still want to ask because I don't know what practices are possible and what are not. You see, right now I am studying basic J2EE. Our assignment is to make a web-based application using JSP and servlets. One of my problems is doing the forms.

我知道HTML是在JSP中制作表单的最佳实践,因为几乎所有人都在使用它(基于示例在书籍/互联网上)。但Java也有它自己的形式,即Swing,AWT,它们都是通过使用事件来完成的。如果我不想使用HTML,我可以使用Java的Swing / AWT还是仅适用于桌面应用程序?除了我所提到的,还有什么可以使用的?

I know that HTML is the best practice in making the forms in JSP because almost all people are using it(based on the examples on the books/internet). But Java also have its own forms which is the Swing, AWT and it all worked by using the events. If i don't want to use HTML, can I use Java's Swing/AWT or is it for the desktop applications only? Aside from what I've mentioned, what else can I use?

推荐答案

是的,java在Swing和AWT中有许多组件。

Swing和AWT组件都支持事件处理。

但是我从来没听说过JSwing。

Yes java has many Components in Swing and AWT.
And both Swing and AWT Components support Event Handling.
But I never have heard of JSwing.

Swing和AWT仅适用于桌面应用程序。

但是正如Orbit所说


Swing and AWT are for the desktop application only.
But as Orbit said

您可以定义在applet上使用Swing组件,然后将applet嵌入到JSP页面中。

You can definetly use Swing components on an applet and then embed the applet on your JSP page.

使用HTML将比使用Applet创建表单更容易

Using HTML will be a lot easier than using Applet to make a form

正如所说

As Andrew said

这篇关于制作Web表单:Java与HTML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-30 13:18