<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName">
<value>net.sourceforge.jtds.jdbc.Driver</value>
</property>
<property name="url">
<value>jdbc:jtds:sqlserver://localhost:1433/db</value>
</property>
<property name="username">
<value>root</value>
</property>
<property name="password">
<value>root</value>
</property>
</bean>
<bean id="sqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
<property name="configLocation">
<value>classpath:SqlMapConfig.xml</value>
</property>
<property name="dataSource">
<ref local="dataSource" />
</property>
</bean>

解决方案 »

  1.   

    org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 11 in the jsp file: /myapp/12.jsp
    Context cannot be resolved to a type
    8: <font size = 5 color = blue> 数 据 查 询</font><hr> 
    9: <%
    10: DataSource pool = null;
    11: Context env = null;
    12: Connection con = null;
    13: Statement st = null;
    14: ResultSet rs = null;这个怎么解决?