tags:

views:

27

answers:

0
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %>

<%@ page import="java.sql.*" %>
<%@ page import="java.io.*" %> 
<HTML>
    <HEAD>
        <TITLE> Test Run </TITLE>
 <script>
 </script> 
    </HEAD>

    <BODY topmargin="0" leftmargin="0" rightmargin="0">
        <table width=100% height=10%>
            <tr>
                <td align=center width=100% height=100% bgcolor="#00008B">
                    <font size=5 color=white face=verdana><b>Create New Test Run</b></font>
                </td>
            </tr>
        </table>

 <%
     try
     {
       Connection conn=null;
       Statement st=null;
       Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
       conn=DriverManager.getConnection("Jdbc:Odbc:try");
       st=conn.createStatement();
       String s="select ServerName from server";
       String a="select user from agent";
       ResultSet ser=st.executeQuery(s);
       st=conn.createStatement();
       ResultSet ag=st.executeQuery(a);
       String sc="select ScriptName from script";
       st=conn.createStatement();
       ResultSet sc1=st.executeQuery(sc);


 %>


 <br><br><br>
        <html:errors/>
        <html:form action="success">
            <font size=2 face=verdana>Server Under Test<br>

     <html:select property="server_name">
     <html:option value=""></html:option>
     <% while(ser.next()){
     %>

  <html:option value="<%= ser.getString(1) %>"> </html:option>
         <% } %>

            </html:select>



            <p>Agent<br>
            <html:select property="agent">
                <html:option value=""></html:option>
  <% while(ag.next()){
     %>

  <html:option value="<%= ag.getString(1) %>"> </html:option>
         <% } %>

            </html:select>
            <p>
                <span style="float:left;">Script<br>
                <html:select property="script">
                    <html:option value=""></html:option>
      <% while(sc1.next()){
             %>

  <html:option value="<%= sc1.getString(1) %>"> </html:option>
         <% } %>


                </html:select>
                </span>

                <span>Params<br>
                <html:text property="param"/></span>
                <p>
                  **//the follwoing field should save the above fields by the name mentioned in the next input field i.e use a new test set**
                    Test set<br>
                    <html:select property="testset">
          <html:option value=""></html:option>

                    </html:select>
                    <br>or use a new set
                    <input type="text" size=100 name="testsetname">
                </p>

                <p>
                    <html:submit/>
            </font>
        </html:form>

 <% 
           }
    catch(Exception e)
    {
      System.out.println("Trouble: "+e.getMessage());
           }
 %>

    </BODY>
</HTML>