<%@ page contentType="text/html; charset=gb2312"%>
<%@ taglib uri="struts-html" prefix="html" %>
<%@ taglib uri="struts-bean" prefix="bean" %>
<%@ taglib uri="struts-logic" prefix="logic" %>
<%@page import="java.sql.*"%><html>
  <head>
    <META http-equiv=Content-Type content="text/html;charset=gb2312">
    <title>加为好友提示</title>
  </head>
  <body>
    <center>
        <table width="529" height="112" border="1" cellpadding="0" cellspacing="0" bordercolor="lightgrey" bordercolorlight="lightgrey" bordercolordark="white" bgcolor="#F9F9F9" rules="none" style="margin-top:8">
        
          <tr>
            <td width="124" height="53">你已添加:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
              <td width="130"><bean:write name="bbsUserSingle" property="userName"/></td><td width="267">为好友</td>
 <bean:define id="tempValue" name="bbsUserSingle" property="userName"/>  
 
            <tr height="60"><td height="57" colspan="2" align="center" style="text-indent:20"><html:button property="back" value="返回" onclick="javascript:window.history.go(-1)"/></td><td>&nbsp;</td></tr>             
      </table>
    
<%
  try
  {
    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance(); 
    String dbName="students";
    String tableName="students";
    Connection conn=java.sql.DriverManager.getConnection("jdbc:microsoft:sqlserver://127.0.0.1:1433;DatabaseName=students","sa","");
    conn.close();
  }
  catch(Exception e)
  {
    out.println(e);
  }
%>
        <br>
    </center>
  </body>
</html>
没有 </table>下的那些代码的话能运行,可加了那段代码后出现如下问题:
An error occurred at line: 27 in the jsp file: /pages/show/user/friends.jsp
Syntax error on token "Invalid Character", delete this token
24: <%
25:   try
26:   {
27:     Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance(); 
28:     String dbName="students";
29:     String tableName="students";
30:     Connection conn=java.sql.DriverManager.getConnection("jdbc:microsoft:sqlserver://127.0.0.1:1433;DatabaseName=students","sa","");
我想把
<bean:define id="tempValue" name="bbsUserSingle" property="userName"/>
中tempValue存到数据库中去。。要怎么办啊?