Index.jsp Sample

This topic inludes the source code for the Index.jsp Sample.

Sample Location

This sample is located in the following directory in your WebLogic Workshop installation:

BEA_HOME/weblogic81/samples/workshop/SamplesApp/EJBs_ClientApps/messageDriven/

Sample Source Code


01 <%@ page language="java" contentType="text/html;charset=UTF-8"%>
02 <%@ taglib uri="netui-tags-databinding.tld" prefix="netui-data"%>
03 <%@ taglib uri="netui-tags-html.tld" prefix="netui"%>
04 <%@ taglib uri="netui-tags-template.tld" prefix="netui-template"%>
05 <netui:html>
06     <head>
07         <title>
08             Message Driven Page
09         </title>
10     </head>
11     <body> 
12        <p><font size="-1"><em>Add 20 via Queue</em> sends 20 JMS messages to a queue and orders
13        the creation of tokens. <em>Add 20 via Topic</em> sends 20 JMS messages to a topic and orders
14        the creation of tokens. After sending JMS message, press the <em>Refresh (Ordered</em> buttons
15        repeatedly to see the gradual creation of tokens. For more information, see the
16        Message-Driven Bean Sample topic in WebLogic help.</font> 
17         <netui:form action="refreshPage">
18             <netui:button value="Refresh" type="submit" action="refreshPage"/>
19             <netui:button value="Refresh Ordered" type="submit" action="refreshPageOrdered"/>
20             <netui:button value="Add 20 via Queue" type="submit" action="addViaQueue"/>
21             <netui:button value="Add 20 via Topic" type="submit" action="addViaTopic"/>
22             <netui:button value="Delete All via Queue" type="submit" action="deleteViaQueue"/>
23         </netui:form>
24         </p>
25         <netui-data:repeater dataSource="{pageFlow.allTokens}">
26            <netui-data:repeaterHeader>
27               <p>The following tokens are currently known:</p>
28               <p><table border="1" cellpadding="4">
29                   <tr>
30                      <td><b>Name</b></td>
31                      <td><b>Date Entered</b></td>
32                      <td><b>Entered By Class</b></td>
33                      <td><b>Object Hash</b></td>
34                     </tr>
35             </netui-data:repeaterHeader>
36             <netui-data:repeaterItem>
37                <tr>
38                   <td>
39                      <netui:label value="{container.item.name}" />
40                   </td>
41                   <td>
42                      <netui:label value="{container.item.date}" />
43                   </td>
44                   <td>
45                      <netui:label value="{container.item.enteredByClass}" />
46                   </td>
47                   <td>
48                      <netui:label value="{container.item.objectHash}" />
49                   </td>
50                </tr>
51             </netui-data:repeaterItem>
52             <netui-data:repeaterFooter>
53                 </table>
54                 <p><font size="-1"><em>Name</em> is the name of the token, and reflects
55                 the order of the JMS messages as they were sent. <em>Entered By Class</em>
56                 shows which message-driven bean class received the message, while <em>Object 
57                 Hash</em> shows the actual object which received the message.</font></p>
58             </netui-data:repeaterFooter>    
59         </netui-data:repeater>
60     </body>
61 </netui:html>