s******e 发帖数: 493 | 1 How can one integrate a java class into a HTML page? Are Applet ,Servelet and
JSP the only ways to use a Java class in a HTML page? If I simply put a java
class with a form such as "Action=1.class", is the java intepretor going to
run it? In another word, can I run a java class with the way I run a
javascript or VBScript program?
Thanks, | r***l 发帖数: 67 | 2 JSP is the closest to what you need.
You can put your java code directly inside <% %>.
However, it is never a good way to put java code directly inside JSP page,
unless the project is very simple.
The java code should belong to backend. You can use JSTL for basic logic on
the JSP page.
and
【在 s******e 的大作中提到】 : How can one integrate a java class into a HTML page? Are Applet ,Servelet and : JSP the only ways to use a Java class in a HTML page? If I simply put a java : class with a form such as "Action=1.class", is the java intepretor going to : run it? In another word, can I run a java class with the way I run a : javascript or VBScript program? : Thanks,
|
|