sendtool.jsp
来自「jakarta-taglibs」· JSP 代码 · 共 92 行
JSP
92 行
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<%@ taglib uri="http://jakarta.apache.org/taglibs/jms-1.0" prefix="jms" %>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Send Message Tool</title>
<link rel="stylesheet" href="examples.css" type="text/css">
</head>
<body>
<%
String connection = request.getParameter( "connection" );
if ( connection == null ) {
connection = "topic";
}
String destination = request.getParameter( "destination" );
if ( destination == null ) {
destination = "";
}
String text = request.getParameter( "text" );
if ( text == null ) {
text = "";
}
%>
<h2>Send JMS Message</h2>
<p>Enter a text message to send</p>
<form METHOD="GET" ACTION="<%= request.getRequestURI() %>">
<table width="100%">
<tr>
<td>
Connection name:
</td>
<td>
<input type="text" name="connection" value="<%= connection %>" size="50"/>
</td>
</tr>
<tr>
<td>
Destination:
</td>
<td>
<input type="text" name="destination" value="<%= destination %>" size="50"/>
</td>
</tr>
<tr>
<td>
Message text:
</td>
<td>
<input type="textarea" name="text" value="<%= text %>" size="50"/>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="submit" value="Send Message"/>
</td>
</tr>
</table>
</form>
<hr />
<%
if (connection.length() > 0 && destination.length() > 0 ) {
%>
<jms:connection name="<%= connection %>">
<jms:send>
<jms:destination name="<%= destination %>"/>
<jms:textMessage body="<%= text %>"/>
</jms:send>
</jms:connection>
<p>Sent message on connection <b><%= connection %></b> and destination <b><%= destination %></b> with the following contents</p>
<p><%= text %></p>
<%
}
%>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?