I am having a problem of connecting to Mongo DB from Apache Tomcat 7 server; and since I am relatively new to Apache Tomcat Server, I wish to get your help. Thing worked fine in my Eclipe Luna development environment where I was able to connect to Mongo DB. I have the mongo jar file at my /ehcproj/WebContent/WEB-INF/lib/mongo-2.10.1.jar . Since everything worked fine, I exported the project war file to my Apache Tomcat 7's webapps folder. I then shut down and restarted Tomcat. However, I notice that my Tomcat 7 server did not connect to my Mongo DB. I do not know what 's wrong since it was working and connected when it was at my Eclipse Luna. I wonder what are the missing pieces? I read from google and someone suggested that I need to include the mongo db driver in my apache tomcat 7 server 's lib folder which I did but it still did not work. I wish to get your help if you could shed some light into what I need to do in order to make it works.
If your webapp depends on any IDE, then your webapp is defective. There isn't going to be any IDE when it goes into production (not if there's any sanity in your shop, anyway!)
MongoDB has a JDBC driver and presumably that driver is rated to be used as a sharable server-supplied resource like (almost) all other JDBC drivers. But that's for SQL access to MongoDb, and I'm presuming you are doing native access. To the best of my knowledge, that particular set of services cannot be shared and therefore cannot be placed into TOMCAT_HOME/lib.
Webapp libraries should always be placed in the WAR's WEB-INF/lib directory.
"privilege" comes from the Latin words for "private" and "law" (legal) and dates to feudal times. To "claim privilege" meant that you were above the laws that applied to the common people.
Would you turn that thing down? I'm controlling a mind here! Look ... look at the tiny ad ...