tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Choe <choep...@mindspring.com>
Subject dbtags - <sql:setColumn> question
Date Mon, 27 Oct 2003 18:04:14 GMT
i am using dbtags library in my jsp file.

i have the following set up:

<table border="1">
<tr><th>Course</th><th>Days of Week</th><th>Time</th><td></td></tr>
<sql:preparedStatement id="pstmt" conn="con">
  <sql:query>SELECT crs_id, discipline, course_num, days_of_week, 
time_slot FROM time_slots, wait_list_course WHERE 
time_slots.time_id=wait_list_course.t
ime_id AND is_available='Yes' AND discipline=? AND 
wait_list_course.semester=?</sql:query>
  <sql:setColumn 
position="1"><%=request.getParameter("discipline")%></sql:setColumn>
  <sql:setColumn position="2"><%=semester%></sql:setColumn>      
  <sql:resultSet id="rs">
     <tr><td>
        <sql:getColumn position="2" />
        <sql:getColumn position="3" /></td><td>
        <sql:getColumn position="4" /></td><td>
        <sql:getColumn position="5" /></td><td>
           <sql:preparedStatement id="pstmt2" conn="con">
              <sql:query>SELECT added, removed FROM student_status WHERE 
crs_id=? AND student_id=? AND added is not null</sql:query>
                 <sql:setColumn position="1"><sql:getColumn position="1" 
/></sql:setColumn>
                 <sql:setColumn 
position="2"><%=(String)session.getAttribute("sid")%></sql:setColumn>
                 <sql:resultSet id="rs2">
                 </sql:resultSet>
                 <sql:wasEmpty><input type="button" name="add" 
value="Add Me" onClick="getOn('<sql:getColumn position="1" />', 
'add')"></sql:wasEmpty>
                 <sql:wasNotEmpty><b>Added</b></sql:wasNotEmpty>
           </sql:preparedStatement></td></tr>
  </sql:resultSet>
  <sql:wasNotEmpty />
  <sql:wasEmpty><tr><td 
colspan="4"><%=request.getParameter("discipline")%> currently has no 
courses available for wait list for <%=session.getAttribute(
"semester")%> semester.</td></tr></sql:wasEmpty>
</sql:preparedStatement>
<tr><td colspan="4" align="center"><a 
href="/registrar_appt/waitlist/menu.jsp">Back to main menu</a></td></tr>
</table>
</form>
</center>

when i run the page in the web browser the value of the <sql:setColumn 
position="2"> <%=(String)session.getAttribute("sid")%></sql:setColumn> 
is shown on the web browser.  but this doesn't occur on a constant 
basis.  if i refresh the page, the value is not shown.  is the syntax 
correct or is there something i need to do to prevent the value from 
being processed by the web browser?

Peter Choe


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Mime
View raw message