开发者

best way to convert eclipse project to a tomcat servlet?

I am working on a servlet using Eclipse. It runs perfectly fine when I use my Junit tests inside of eclipse. The problem is that I need to run this same servlet using tomcat. I am having trouble getting it to w开发者_运维技巧ork though. The error seems to be when my code attempts to load the JDBC drivers to connect to MYSQL. I think it has to do with the location of the jar files.

I was wondering if rather than trying to figure out all this stuff with tomcat, is there a way that you guys would recommended to quickly export my project from eclipse to Tomcat?


Bro, I think that you have port numbers in your database connect url. Take these out your dont need them and they are causing your errors.


if you are using eclipse web dynamic project facet, you can directly export your project as war (web app archive) file and use it to deploy to tomcat. If not, you may wanna use maven or ant to create the package file


It sounds like you just need to copy the MySQL connector jar into your Tomcat lib folder.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜