<%
   String connStr=request.getParameter("connStr");
   if (connStr==null) {
     connStr=(String)session.getValue("connStr");
   } else {
     session.putValue("connStr",connStr);
   }
   if (connStr==null) { %>
<jsp:forward page="../setconn.jsp" />
<%
   }
%>

<jsp:useBean id="htmlQueryBean" class="beans.HtmlQueryBean" scope="session" />
<jsp:setProperty name="htmlQueryBean" property="searchCondition" />
<jsp:setProperty name="htmlQueryBean" property="connStr" value="<%= connStr %>" />

<HTML>
<HEAD> <TITLE> The UseHtmlQueryBean JSP  </TITLE> </HEAD>
<BODY BGCOLOR="white">

<%  String searchCondition = request.getParameter("searchCondition"); 
    if (searchCondition != null) { %>
      <H3>Search Results for : <I> <%= searchCondition %> </I> </H3>
      <%=  htmlQueryBean.getResult() %>
      <BR> <HR>
<%  }  %>
    
<P><B>Enter a search condition:</B></P>
<FORM METHOD=get> 
<INPUT TYPE=text NAME="searchCondition" SIZE=30>
<INPUT TYPE=submit VALUE="Ask Oracle">
</FORM>
</BODY>
</HTML>
