answersLogoWhite

0

Java code can be embedded into HTML and also HTML code can be embedded into java code through Java Server Pages Technology (JSP).

eg: Java code inside HTML.

Hello! The time is now <%= new java.util.Date() %>

This is someHelloJavaProgram.jsp , not someHelloJavaProgram.HTML page

eg: HTML code inside Java code

import javax.servlet.*;

import java.io.*;

public class HelloServlet extends HttpServlet {

public void doGet(HttpServletRequest incoming,

HttpServletResponse outgoing)

throws ServletException, IOException {

outgoing.setContentType("text/HTML");

PrintWriter out = outgoing.getWriter();

out.println("Hello!");

out.println("

Hello Servlet World

");

out.println("");

out.close();

}

}

http://www.wellho.net/resources/ex.php4?item=j906/HelloServlet.java

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

How do you give connection between HTML and java servlet?

You cannot. HTML is a static file and it cannot interact with a Java Servlet. A Servlet can always redirect to a HTML page but the other way round cannot happen.


Coding for creating HTML editor using java applet?

&lt;html&gt; &lt;body&gt; java applets&lt;/body&gt;&lt;/html&gt;


Why is important to learn HTML before learning JAVA?

It is not necessary to learn HTML before learning Java. Java is a complete computer programming language. The only reason you would need to know HTML with Java is if you wanted to use Java to generate webpages, or you wanted to create Java applets that you would then embed into webpages using HTML.


Do you have experience in Java or HTML?

I have some experience in HTML but not JavaScript.


What is HTML and how can use in java applications?

HTML is a markup language for the Web. It could be used to create Java applications for the web.


What does it mean to do HTML submit?

HTML means Hypertext Markup Language. The tag is used for various javascripts and Java programs. HTML submit is a form of a script in Java programming.


What is the fullform of REL in HTML?

The REL attribute in HTML is a shortened version of "relationship." REL attributes are used to define the relationship between one file and another.


How does java script ehance the capabilites of HTML?

Javascript can change how HTML will work, alike how CSS makes HTML look flashy.


What is need to build dynamic web documents?

java,html


How do you restrict no of characters in text box in HTML?

by using java script


What is the tag in Html for providing space Similar to t in java?

The answer is : &amp;nbsp;


What should you known to study java script?

Xhtml/html &amp; css