Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

running a java server application hosting online

Posted on 2006-11-30
8
Medium Priority
?
183 Views
Last Modified: 2013-11-24
Hi experts,

I think i know the answer, but i want to confirm...
I have a server application, written with java sockets, (i.e. running on some port 13000), and I need to put it online, on the same server computer as my database.  

So probably i need to use custom DNS, and unblock the port on my own computer.  But i cannot run it on my own computer.  Is there any company online that offers hosting where you can allow access to a port?  

since this probably doesnt exist, how can i rewrite my program?  with SOAP?  
 It receives a serialized file and puts the file's info in the database.  so it has to be java.  I don't know if Servlets can handle things like that.

Thanks
daniel
0
Comment
Question by:dbrownell83
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 28

Expert Comment

by:rrz
ID: 18050700
>I don't know if Servlets can handle things like that.  
Yes, but you will need a servlet container like Tomcat.
0
 
LVL 5

Expert Comment

by:deeppra
ID: 18051279
yea u can do that using servlet... here u have a very nice free server try this
www.myjavaserver.com

Create a account and u can host u r application there
0
 
LVL 26

Expert Comment

by:ksivananth
ID: 18051779
I would suggest,

1. Develop a servlet which takes the call from all clients in port 80.
2. Forwards the call to you server application running on the same machine/a machine running in the same network where the port can be opened through Socket.
3. Server process request and sends back the result to the servlet and the servlet in turns send back to the client.
4. U will also need to do the changes in client to make the http connection to servlet.
5. But no change required in server!
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 26

Expert Comment

by:ksivananth
ID: 18051787
above approach enables the HTTP communication as well as Socket!
0
 
LVL 1

Author Comment

by:dbrownell83
ID: 18052958
thanks for the answers,

i dont think myjavaserver offers enough space.  5 mb?  i need at least 10 GB to start with.  
i found one site that allows opening the port, but they are $30/month, which is a lot.  

i'm interested in ksivananth's suggestion, but am not sure how to send the file.
At the moment, within a java application, the user clicks 'Upload', and it sends the
serialized file from the user directory to the server socket.  

So, how is it possible to send a get/post request, with string command and object file...
from within the program, to a servlet?  I imagine it will be easy to call the socket server
from the servlet.  It is sending the servlet a large object that I've never heard of before.  
Have you done something like this before?

Thanks
Daniel
0
 
LVL 26

Accepted Solution

by:
ksivananth earned 1600 total points
ID: 18055921
assuming you got the HttpURLConnection, below is the code for writing any serialized object to that,

                                con.setDoInput(true);
            con.setDoOutput(true);
            con.setUseCaches(false);
            con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");

            ObjectOutputStream out = null;

            // Write the serialized request as post data
            out = new ObjectOutputStream(con.getOutputStream());
            out.writeObject(req);

            out.flush();
            out.close();
0
 
LVL 26

Expert Comment

by:ksivananth
ID: 18055929
Have you done something like this before?

Yes!
0
 
LVL 1

Author Comment

by:dbrownell83
ID: 18059158
thanks, i will try it out in the next few days
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question