lani1234 Posted December 13, 2013 Posted December 13, 2013 In the 404 error message, it says the resource is not available, and it lists lani1234_CandC which is the name of my database. I am trying to connect to the mySQL database using my Java web app. Is there anything out of the ordinary that needs to be done to connect to the database I have set up on your server? The database name is lani1234_CandC username: lani1234_lanipassword: dbpass I am using:driver = "com.mysql.jdbc.Driver"url = "jdbc:mysql://localhost/lani1234_CandC" I have this same .war file deploying fine on a different server.I have placed a new .war file in my home directory (home/lani1234/CandC.war) if you wouldn't mind re-deploying it just in case I had a typo in the database name or something. I appreciate any input you might have otherwise.
Krydos Posted December 14, 2013 Posted December 14, 2013 Deployed. http://lani1234.heliohost.org/CandC It looks like you might have already figured this out, but for the best response time just created a new thread each time you have a new version to deploy. Here is a working snippet from a .jsp file that connects to a mysql database. Perhaps it will help you. <sql:setDataSource var="snapshot" driver="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost/username_jsptest" user="username_jsptest" password="censored"/> <sql:query dataSource="${snapshot}" var="result"> SELECT * from people; </sql:query> Also, it's usually a bad idea to post your passwords in a public forum.
lani1234 Posted December 14, 2013 Author Posted December 14, 2013 I am still getting the same error message with this .war file. I am connecting to the database through a java class. My web app uses jsp and java servlets. The jsp files access the servlets which do all the heavy lifting.Although I am sure I have the code right for connecting through a java class, do you have a snippet of that?Also, you use Tomcat, correct? What version? Could that be an issue if my project is optimized for Tomcat 7?Thank you
lani1234 Posted December 14, 2013 Author Posted December 14, 2013 As an update, I am also getting a 404 error when I try to go to http://lani1234.heliohost.org/CandC/LoginPage.jsp which is my apps main page. HTTP Status 404 - /CandC/LoginPage.jsptype Status reportmessage /CandC/LoginPage.jspdescription The requested resource is not available.
Recommended Posts