Home arrow static arrow Java Programming [Archive] - running my servlet on a network?
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - running my servlet on a network?
This topic has 4 replies on 1 page.

Posts:17
Registered: 10/14/03
running my servlet on a network?  
Aug 5, 2004 11:59 AM



 
I have created a java servlet that runs on TomCat 5. The web application performs various tasks to a Microsoft access database. When I run it on my local machine it works fine. Now I have to put it on a local server so it can be accessed within the department. I was wondering if there is an easy way to achieve this? I have been researching ways to do this and the only thing I have found is to use RMI (Remote Method Invocation). Is there a way to accomplish this without re-writing my program?

Thanks
 

Posts:21,718
Registered: 98-02-20
Re: running my servlet on a network?  
Aug 5, 2004 12:06 PM (reply 1 of 4)



 
I have created a java servlet that runs on TomCat 5.
The web application performs various tasks to a
Microsoft access database. When I run it on my local
machine it works fine. Now I have to put it on a
local server so it can be accessed within the
department. I was wondering if there is an easy way
to achieve this?

Yes - install Tomcat 5.0 on the server and deploy your app on it. Now everybody that can see the server on the network can get to your servlet/Web app via a browser.

I have been researching ways to do
this and the only thing I have found is to use RMI
(Remote Method Invocation). Is there a way to
accomplish this without re-writing my program?

Thanks

See previous answer. No need for RMI. You're using HTTP as the protocol by definition the moment you say "servlet".

%
 

Posts:31,095
Registered: 4/30/99
Re: running my servlet on a network?  
Aug 5, 2004 12:07 PM (reply 2 of 4)



 
Sure. Putting the database on the same machine as the Tomcat server is the easiest way.
 

Posts:21,718
Registered: 98-02-20
Re: running my servlet on a network?  
Aug 5, 2004 12:21 PM (reply 3 of 4)



 
If other applications use the same database, I'd prefer putting it on a separate box. I wouldn't want rebooting the Web server to affect the database.

If the database is already on a separate box (either a database server that your desktop has been connecting to all along OR your desktop itself) you don't have a problem.

If the database is on your desktop I'd move it to a production server ASAP.

%
 

Posts:17
Registered: 10/14/03
Re: running my servlet on a network?  
Aug 5, 2004 12:41 PM (reply 4 of 4)



 
Thank you for the help, no other applications uses this specific database. I will try to install TomCat on the server.
 
This topic has 4 replies on 1 page.