?
=?big5?B?TWluZ6dC?=
Hi!
Do anyone know pass the string array from A jsp to B jsp? For
example, I want to pass Strresult to query.jsp for operation. How can
I do? THX!
Ming
<%@page contentType="text/html"%>
<%@page pageEncoding="Big5"%>
<%@page import = "java.sql.*"%>
<html>
<head><title>¥D¾÷ªO¬d¸ßµ²ªG</title></head>
<body>
<form action="query.jsp" method="post">
<%
String Strresult[] = new String[10];
String Test = "";
int i = 0;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con =
DriverManager.getConnection("jdbcdbc:MT450");
Statement smt = con.createStatement();
String name =
new
String(request.getParameter("name").getBytes("ISO-8859-1"));
String sql = "select Standard from Combinations where Model ='"
+ name + "'";
String color;
ResultSet rs = smt.executeQuery(sql);
while(rs.next()){
Strresult=rs.getString(1);
out.println(Strresult[i++]+"<p>");
}
con.close();
%>
<input type="submit" value="½T»{¥æ©ö">
<input type='hidden' name='name' value='<%= name %>'>
<input type='hidden' name='Test' value='<%= Test %>'>
</form>
</body>
</html>
Do anyone know pass the string array from A jsp to B jsp? For
example, I want to pass Strresult to query.jsp for operation. How can
I do? THX!
Ming
<%@page contentType="text/html"%>
<%@page pageEncoding="Big5"%>
<%@page import = "java.sql.*"%>
<html>
<head><title>¥D¾÷ªO¬d¸ßµ²ªG</title></head>
<body>
<form action="query.jsp" method="post">
<%
String Strresult[] = new String[10];
String Test = "";
int i = 0;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con =
DriverManager.getConnection("jdbcdbc:MT450");
Statement smt = con.createStatement();
String name =
new
String(request.getParameter("name").getBytes("ISO-8859-1"));
String sql = "select Standard from Combinations where Model ='"
+ name + "'";
String color;
ResultSet rs = smt.executeQuery(sql);
while(rs.next()){
Strresult=rs.getString(1);
out.println(Strresult[i++]+"<p>");
}
con.close();
%>
<input type="submit" value="½T»{¥æ©ö">
<input type='hidden' name='name' value='<%= name %>'>
<input type='hidden' name='Test' value='<%= Test %>'>
</form>
</body>
</html>