In this video, we will create message producer JSP file. Here, we create html form which collects user information to form the text message.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!-- Sample 9.07: All required Packages --> <%@ page import='javax.jms.Queue' %> <%@ page import='javax.jms.ConnectionFactory' %> <%@ page import='javax.jms.Connection' %> <%@ page import='javax.jms.Session' %> <%@ page import='javax.jms.MessageProducer' %> <%@ page import='javax.jms.TextMessage' %> <%@ page import='javax.naming.InitialContext' %> <%@ page import='javax.naming.Context' %> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Insert title here</title> </head> <body> <!-- Sample 9.06: Create the HTML Form --> <form action="BookFreeShipment.jsp"> Booking Person Name: <Input name="BookerName" type="text" size="25" value="Your Name Here" ><br> Weight of Shipment: <Input name="ShipmentWt" type="text" size="5" value="0" > in Kg <br> <INPUT type="submit" name="todo" value="Book Shipment"> <p>Once you get your Shipment Number, call our agent and give the Number for Free Shipping.</p> <p>Note: Getting Shipment Number may take a while!</p> <br> </form> </body> </html> |
Categories: JavaEE-EJB-Tube