Topic: tomcat 上运行jsp访问sqlserver 2000 无结果

  Print this page

1.tomcat 上运行jsp访问sqlserver 2000 无结果 Copy to clipboard
Posted by: LongLe
Posted on: 2004-04-27 13:36

我的系统:Adv win2000 + tomcat 5.0 + sqlserver2000 + j2sdk1.4.0

我的配置:我已安装了 jdbc sqlserver2000 的驱动程序。并将三个jar包

mssqlserver.jar msutil.jar msbase.jar 添加到classpath 中。并且已正确

设置了 j2sdk 。我用 JBuilder9 + Adv win2000 + sqlserver2000 运行jsp

访问数据库的程序成功了,但同样一个程序放在 tomcat 5.0 上就不行。

运行后没有结果。要说明的是我的 tomcat 5.0 运行非数据库程序表现良好。

请问,是我的配置有问题吗,还是别的毛病。谢谢。

2.Re:tomcat 上运行jsp访问sqlserver 2000 无结果 [Re: LongLe] Copy to clipboard
Posted by: ppp5
Posted on: 2004-04-28 09:47

I think you should put those jar files in webapps/your apps dir/WEB-INF/lib directory and try again.

It should work.

3.Re:tomcat 上运行jsp访问sqlserver 2000 无结果 [Re: LongLe] Copy to clipboard
Posted by: LongLe
Posted on: 2004-04-28 13:54

首先谢谢 ppp5 的关注和指导

我已经按您说的作了,并且也将三个包放在了 tomcat5.0/common/lib 下

重新启动,也不行。请问还需要作什么。再次表示感谢。谢谢。

4.Re:tomcat 上运行jsp访问sqlserver 2000 无结果 [Re: LongLe] Copy to clipboard
Posted by: ppp5
Posted on: 2004-04-29 07:56

Hi!

Those jar files are not in the tomcat5.0/common/lib directory. I did not say put them under this directory.

If you have a application directory structure like

webapps/myapps

Then there should be have a directory called WEB-INF under the myapps.
Under the WEB-INF create a directory called lib and put those jar files under this directory.

So when you visit your web site, the url like:
http://localhost:8080/myapps/testsql.jsp

So the files structure should be like

webapps/myapps/WEB-INF/lib/*.jar files

not under the tomcat5.0/common/lib directory

best,

5.Re:tomcat 上运行jsp访问sqlserver 2000 无结果 [Re: LongLe] Copy to clipboard
Posted by: flysky2003
Posted on: 2004-05-04 10:54

放在tomacat_home/common/lib下可以的,我就是这么做的

6.Re:tomcat 上运行jsp访问sqlserver 2000 无结果 [Re: LongLe] Copy to clipboard
Posted by: KQH0319
Posted on: 2004-05-06 11:13

学习

7.Re:tomcat 上运行jsp访问sqlserver 2000 无结果 [Re: LongLe] Copy to clipboard
Posted by: NoLimited
Posted on: 2004-05-10 18:01

放在tomacat_home/common/lib下可以的,我也是这么做的。

8.Re:tomcat 上运行jsp访问sqlserver 2000 无结果 [Re: NoLimited] Copy to clipboard
Posted by: LongLe
Posted on: 2004-05-11 15:03

谢谢各位的热心帮助

你们上面说的我都试过,不行.

劳驾那位能把您的 "详细过程" 给我讲一遍,最好能抓几个图.

9.Re:tomcat 上运行jsp访问sqlserver 2000 无结果 [Re: LongLe] Copy to clipboard
Posted by: 4bug
Posted on: 2004-05-11 15:43

打开Tomcat-Home/logs 看看Tomcat的错误日志,是什么原因,再解决啊。


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923