回xycleo()虚竹和尚() :在调试的时候,如果我只调用brand_code或者brand_name的一个,都没问题,就是在同时用到的时候,weblogic出现:Error 500--Internal Server Error From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1: 10.5.1 500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request.
我改成这样就可以了,为什么??????????????<% String brand_sql="select * from brand_ptype where ptype_code='" + product_type + "'"; ResultSet brand_rs=dbconn.executeQuery(brand_sql); %> <% while (brand_rs.next()){String brand_name=brand_rs.getString("brand_name"); String brand_code=brand_rs.getString("brand_code");//这两句顺序反一下。也就是和数据表中的字段顺序一样。 %> <td width="17%">
String brand_sql="select * from brand_ptype where ptype_code='" + product_type + "'";
ResultSet brand_rs=dbconn.executeQuery(brand_sql);
%>
<%
while (brand_rs.next()){
%>谢谢了!
<%
String brand_sql="select * from brand_ptype where ptype_code='" + product_type + "'";
ResultSet brand_rs=dbconn.executeQuery(brand_sql);
%>
<%
while (brand_rs.next()){
brand_code=brand_rs.getString("brand_code");
brand_name=brand_rs.getString("brand_name"); }
%>
String brand_sql="select * from brand_ptype where ptype_code='" + product_type + "'";
ResultSet brand_rs=dbconn.executeQuery(brand_sql);
%>
<%
while (brand_rs.next()){
String brand_code=brand_rs.getString("brand_code");
String brand_name=brand_rs.getString("brand_name");
%>
<td width="17%">
<p align=center>[<a href="special.jsp?brand_code=<%=brand_code%>"><%=brand_name%></a>]</p></td>
<%}%>
在试试!
From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
10.5.1 500 Internal Server Error
The server encountered an unexpected condition which prevented it from fulfilling the request.
String brand_sql="select * from brand_ptype where ptype_code='" + product_type + "'";
ResultSet brand_rs=dbconn.executeQuery(brand_sql);
%>
<%
while (brand_rs.next()){String brand_name=brand_rs.getString("brand_name");
String brand_code=brand_rs.getString("brand_code");//这两句顺序反一下。也就是和数据表中的字段顺序一样。
%>
<td width="17%">
<p align=center>[<a href="special.jsp?brand_code=<%=brand_code%>"><%=brand_name%></a>]</p></td>
<%}%>
顺序取值。