index.jsp、frame1.jspが呼び出され、[送信]ボタンをクリックしてデータベースに接続した後、テキストボックスの値をframe1.jspからframe2.jspに渡す必要があります。そうするためにエラーが発生しました。親切に助けてください。
index.jsp
<frameset rows="18%,*">
<frame src="frame1.jsp" name="frame1" scrolling="no">
</frameset>
frameset1.jsp
<td width="15%"><b>
<font color="#FFFFFF" size="3">ADSL Number
<input name="ADSLNO" type="text" />
<input name="Submit" type="submit" value="Confirm" />
</font></b></td>
</tr>
</table>
</form>
<frameset cols="100%,*">
<frame src="frame2.jsp" name="frame2">
<noframes><body>No frame! </body></noframes>
</frameset>
frameset2.jsp
</body>
<%
String ADSL = request.getParameter("ADSLNO");
if(ADSL!= null)
{
String connectionURL = "jdbc:mysql://10.152.31.82/poller";
Connection connection = null;
String buffer = "<div class='divTable'>";
Class.forName("com.mysql.jdbc.Driver").newInstance();
connection = DriverManager.getConnection(connectionURL, "dipadm", "dipadm123");
Statement stmt = connection.createStatement();
ResultSet rs = stmt.executeQuery("select DT, PROFILE, DS_BW, SNR_DW, AT_DW, UCE, MODEL, CRC, RETRAIN from scanProfileData where ADSLNO='" + ADSL + "' order by DT DESC;");
if (rs != null) {
buffer="<div class='divRowh'><div class='divCellDT'>DATE/TIME</div>" ;
buffer=buffer+"<div class='divCellPROFILE'>PROFILE</div>";
buffer=buffer+"<div class='divCellBANDWIDTH'>BANDWIDTH</div>";
buffer=buffer+"<div class='divCellSNR'>SNR</div>";
buffer=buffer+"<div class='divCellATTENUATION'>ATTENUATION</div>";
buffer=buffer+"<div class='divCellCRC'>CRC</div>";
buffer=buffer+"<div class='divCellUCE'>UCE</div>";
buffer=buffer+"<div class='divCellMODEL'>MODEL</div>";
buffer=buffer+"<div class='divCellRETRAIN'>RETRAIN</div></div>";
while(rs.next()){
buffer =buffer+"<div class='divRow'>"
+"<div class='divCellDTr'>"+rs.getString("DT")+"</div>"
+"<div class='divCellPROFILEr'>"+rs.getString("PROFILE")+"</div>"
+"<div class='divCellBANDWIDTHr'>"+rs.getString("DS_BW")+"</div>"
+"<div class='divCellSNRr'>"+rs.getString("SNR_DW")+"</div>"
+"<div class='divCellATTENUATIONr'>"+rs.getString("AT_DW")+"</div>"
+"<div class='divCellCRCr'>"+rs.getString("CRC")+"</div>"
+"<div class='divCellUCEr'>"+rs.getString("UCE")+"</div>"
+"<div class='divCellMODELr'>"+rs.getString("MODEL")+"</div>"
+"<div class='divCellRETRAINr'>"+rs.getString("RETRAIN")+"</div></div>";
}
}
buffer=buffer+"</div>";
response.getWriter().println(buffer);
}
%>