Pls give me an idea, how to convert this following code to jsp

Pls give me an idea, how to convert this following code to jsp. it can works well when i run under the ide. i just want to show the result in internet explorer. please give me a basic tip how to do it. am very new to java

**********************

My Os: WindowsXP

MyServer: Apache Tomcat 5.5.17 Server

My IDE: NetBeans 5.0

*********************

import java.io.IOException;

import java.net.DatagramPacket;

import java.net.InetAddress;

import java.net.MulticastSocket;

public class MulticastClient {

public static void main(String[] args) throws IOException {

MulticastSocket socket = new MulticastSocket(4446);

InetAddress address = InetAddress.getByName("230.0.0.1");

socket.joinGroup(address);

DatagramPacket packet;

// get a few quotes

for (int i = 0; i < 5; i++) {

byte[] buf = new byte[256];

packet = new DatagramPacket(buf, buf.length);

socket.receive(packet);

String received = new String(packet.getData());

System.out.println("Quote of the Moment: " + received);

}

socket.leaveGroup(address);

socket.close();

}

}

[1191 byte] By [enavigatora] at [2007-10-3 4:30:46]
# 1
What do you mean, "convert to JSP"? The JSP would pretty much only contain<% "Quote of the Moment: " + received; %>The rather interesting part is how your data is supposed to arrive at the JSP. You're not even sending an HTTP request.
CeciNEstPasUnProgrammeura at 2007-7-14 22:34:04 > top of Java-index,Java Essentials,Java Programming...
# 2

Thanks for you message, that抯 where my doubt also sir, after compile this java file. Totally am very new to java and netbeans ide.

I can follow this tomcat example

<form action="functions.jsp" method="GET">

foo = <input type="text" name="foo" value="${fn:escapeXml(param["foo"])}">

<input type="submit">

</form>

Just give me a tips. Like opennetbeans IDE place the java file here, place the html file here. Something like that only sir, please help me.

enavigatora at 2007-7-14 22:34:04 > top of Java-index,Java Essentials,Java Programming...
# 3
My suggestion is to go through the entire content of the following link from front to end: http://java.sun.com/j2ee/1.4/docs/tutorial/doc/
masijade.a at 2007-7-14 22:34:04 > top of Java-index,Java Essentials,Java Programming...