请教jsp连接sql server数据库出现“非法字符”的报错!
我的源代码如下:
<%@page contentType= "text/html;charset=8859_1 "%>
<%@page pageEncoding= "UTF-8 "%>
<%@page import= "java.sql.*,java.sql.Connection " %>
<html>
<head>
<meta http-equiv= "Content-Type " content= "text/html; charset=UTF-8 ">
<title> JSP Page </title>
</head>
<body>
<jsp:useBean id= "mybean " scope= "session " class= "mylib.myname " />
<jsp:setProperty name= "mybean " property= "* "/>
<h1> Hello,
<jsp:getProperty name= "mybean " property= "name " /> .
your password is:
<jsp:getProperty name= "mybean " property= "pass " />
</h1>
<%
Connection con=null;
Statement s=null;
ResultSet rs=null;
try{
Class.forName( "com.microsoft.jdbc.sqlserver.SQLServerDriver ");
}
catch(
ClassNotFoundException ce){
out.println(ce.getMessage());
}
try{
con=DriverManager.getConnection( "jdbc:odbc:student ");