请问在jsp:usebean中与sqlserver数据库怎样连接的?
<jsp:useBean id = "connpool" scope = "application"
class = "xbook.common.connPool">
<jsp:setProperty name = "connpool" property = "driverName"
value = "com.microsoft.jdbc.sqlserver.SQLServerDriver"/>
<jsp:setProperty name = "connpool" property = "jdbcURL"
value = "jdbc:microsoft:sqlserver://localhost:1433;DatabaseName = bookstore","sa","1010"/>
按以上代码调用不正确。
出错信息是什么啊?可能性太多了啊
也许你CLASSPATH没设对,或者你TOMCAT没配置好。
请参看如下文章,也许对你有些帮助:
http://www.zdnet.com.cn/developer/code/story/0,2000081534,39134180,00.htm
the requested resource(/index.htm)is not available.
~~~~~~~~~~~
我估计跟数据库没关
jsp页面用.htm扩展名也可以么?
用ODBC不可以吗?
localhost要用本机的计算机名
the requested resource(/index.htm)is not available.// index.htm不存在!
说明你访问的是index.htm ,你的这个文件名叫什么 ? 扩展名是.jsp才支持 <jsp:useBean /> 等等,这些东东的!
你把你的javabean代码贴出来!看看