Running a local project online

avi

Skilled
I have a MyEclipse project which I run locally. It is a simple HTML website with JavaScripts & Java codes. But I have .MDF & .LDF database files. I have no idea how to run the same on online.

How do I make connections with Database & Code online ? Locally I used MS SQL enterprise manager & System DSN from control panel.

Thank you in advance
<
 
Well, you need to upload all the built files on web hosting (in public_html folder). Change the database connectivity path as per path of your web host (e.g. /account_name/public_html/db/db.mdb)

It will be better if you provide db connection code here in snippet
<
 
You must first register and buy a domain. After that, upload your website files on the https folder with web manager.

Got tons of space & many useless TLDs, so no issues
<


#[member='Rahul++'] - I will PM you soon, thanks for replying
<


#[member='Rahul++'] : here is the code snippet which is in almost every .jsp file which makes connectivity with code :

Code:
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Connection con5=DriverManager.getConnection("jdbc:odbc:web");

here "web" is DB name.
 
instead of

Code:
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Connection con5=DriverManager.getConnection("jdbc:odbc:web");

You can try this

Code:
String url= 

"jdbc:jtds:sqlserver://path-to-database/database.mdf";

String id= "username";

String pass = "password";

try{

Class.forName("net.sourceforge.jtds.jdbc.Driver");

con = java.sql.DriverManager.getConnection(url, id, pass);

}catch(ClassNotFoundException c){

c.printStackTrace();

}
 
I will check that. However there are many jsp files, hence it will be better if we use DSN method online
 
First of all, you will need a Host that supports Java Hosting. so do as your hosting provider about java support. And if you have your own server, setup the complete environment(Tomcat, sqlserver or whatever database you use etc.). Most App server accept WAR files & you can try deploy by using WAR achieve as well. This how it is done in eclipse

Ps: I don't know much about java development, the limited knowledge I have is from running hostingdost.com. so my reply might not help you much
 
Ps: I don't know much about java development, the limited knowledge I have is from running hostingdost.com. so my reply might not help you much

No man, I appreciate any little help. Thank you for replying
<


I have a own server. It runs on Windows Server 2008. I have other servers too with Linux OS. But I am using this cos my databases are in .MDF.

I am using MyEclipse, but I will try to execute my project in Eclipse & explore more about WAR.

I have installed MyEclipse & MS SQL on my server & my project runs fine on 8080 port. Now I have to run the same without MyEclipse
 
Back
Top