VBScript Sample: vbscript/general/createjar/createjar.asp
   ASP Script
   Comments or Client-side Script
   HTML and Text

<html>
<head>
<title>Browsing a JAR file</title>
</head>
<body>
<p align="center"><big><big>Browse jar file</big></big></p>
<br>
<%
Dim obj
Dim objinfo
Dim info
Dim jar
Dim meth
Dim prop

Set jar =Server.CreateObject("foo.jar")

Response.Write ("Include "& cstr(jar.getCount) & " bean in the jar file")

Set objinfo = jar.getBeanInfo()

prop = objinfo.getPropertyDescriptors()
meth= objinfo.getMethodDescriptors()

%>

<hr>
<%
Set obj = jar.getInstance(jar.getname(0))
%>

Sample for Invoking Method: Hello Method
<br>
Invoke Result :
<%
    response.write(obj.Hello)
%>


<hr>
<p align="center">
<table>
<%for i = 0 to jar.getCount - 1%>
<tr><td>
      <table border="1" cellPadding="1" cellSpacing="1" width="100%">
           <tr align="center"><td> <%= jar.getName(i) %></td></tr>
           <tr><td>
                <table border="1" cellspacing="0">
                     <tr><td>Properties</td>
                          <td><table border="1" cellPadding="1" cellSpacing="0" width="100%">
                                    <%For Each o In prop%>
                                    <tr><td><%=o.getDisplayName()%></td></tr>
                                    <%next%>
                               </table>
                          </td>
                     </tr>
                     <tr><td>Methods</td>
                          <td><table border="1" cellPadding="1" cellSpacing="0" width="100%">
                                    <%For Each m In meth%>
                                    <tr><td><%=m.getDisplayName()%></td></tr>
                                    <%next%>
                               </table>
                          </td>
                     </tr>
                </table>
           </td></tr>
      </table>
</td></tr>
<%next%>
</table>
</p>
</body>
</html>


Copyright © 1998-2002, Halcyon Software Inc. All rights reserved.