I’m building a project on java, using jersey.
In program I need to connect to database MySql. I have download driver (*.jar file), and have put it to dir WEB-INF/lib (to other jersey libs), also I have added it in build path. If i’m creating war file and uploading it to tomcat server, than everything is ok. But if i’m trying to run it from eclipse with “Run On server”, application can’t find that driver. If i’m creating a small class with main method for testing that driver, and running that class as Application everything is ok.
So where I should put that lib, so my application can see it when I’m running it with eclipse.
PS Also can you recommend me some article about how best to structure project with jersey. Because I don’t what to do. when I have some big peace of page written on html to do. Should I copy its content to java file and return it, or should I upload that file and read it in my class or maybe exist some other solutions?
Use Maven to handle dependencies. For servlet/HTML mapping use a MVC framework such as Spring or Struts.