Moin Phillips

Greenhorn
+ Follow
since Jan 23, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Moin Phillips

The only reason I want to use a web server is to make my chatroom live, i.e. make it available to clients on the Internet. I would stick with the free webspace from Geocities if that worked!

I been researching a lot about this and think these problems are due to my lack of knowledge of servers. I designed my chatroom on a client-server model, I have completed the client side and the server side only works on my local machine. The problem now arises when I try to make my chatroom 'public' or live on the Internet.

There are so many technologies flying around, I've tried to experiment with PHP and PostGres and Java itself has so many solutions JSP/Servlets, RMI, Web Start which all sound confusing to me at the moment.

Therefore i decided on just putting the class files in a JAR and on a server and hope they work without having a container like apache or tomcat or anything, btw I'm using my University's server at the moment which has java installed on it. Once this project is complete I plan on getting a commercial one.

The client side works but when connecting to the server I get socketpermission errors.

Basically, do you think that I'am going about this the right way or do you think I should use some other technology?
17 years ago
Thanks for the code, but I've already got most of that done.

I'm not talking about running a service on windows, I'm talking about an actual Web Server (something you can buy commercially, the thing that this forum is running on). How do I get my Server.java file running on there, where there is no Windows?

Plus whats the deal with these damn applets? I've made mine into JAR files and signed them and done pretty much everything by the book and I still get SocketPermission errors! There are no files being accessed nothing being changed, only messages sent forth and back. I dont want to mess around with policy files as my chatroom will have hundreds of clients and I dont want to be giving them directions to changing their policy files.

Thank you for you help so far.

Mo
17 years ago
Yes, I know about the ServerSockets, but what I'm trying to say is how do you run a main method on a server? Do servers have command lines from where you can run a server.java file and let it run continuously?
17 years ago
Hi,

I'm new to these forums and came across it through the Head First books. Anyway, Im creating a simple chat program and I've coded all the client side files, placed them in a jar and signed them. This part works perfectly fine on my local machine and and from a remote server (at the moment only shows the GUI of the chat room).

I'm having trouble with the next bit, that is how do I listen for connections 24/7?

I know that I need some form of loop that listens for connections, btw I'm using sockets and I know all about them and I have even coded a few parts to this. So, if I have a clas file with a main method that continuously listens for connections, how do i get it to run on a server 24/7?

I'd prefer to stay away from Servlets and JSP as i am still readin the Head First book on that, but I know you can do it through Jar files cant you?
17 years ago