Anomander Rake

Greenhorn
+ Follow
since May 31, 2005
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 Anomander Rake

I and some other folks are experimenting with an open source voice chat program that uses applets to send sound between groups of PCs through our website server (as opposed to directly between PCs, or using one of the PCs as the server). The program sends sound in .au format (Sun's format). Someone claimed that this would give us problems with Macs, because Macs don't use .au format.

Does anyone know if this is true? I thought that with applets, Java itself would take care of handling sound files, and whatever, through the virtual machine associated with the browser (We havn't found anyone with a Mac to try it out on yet).

PS: If that IS a potential problem, is there some other preferred sound format that is likely to work across different types of OSs and machines?
18 years ago
I recently downloaded a free voice chat program consisting of an applet, a small server program that listens at a certain port, and a group of related classes, etc. all in a nice directory structure. I put the whole thing on my server, made a jar file for some of the stuff as instructed and it works fine. However, it is a very simple setup that blindly sends voice data to everyone who is logged in - it's all one big chatroom. However, I want to be able to let users log into and talk in several separate chatrooms. I have begun to go through the code to figure out what part is doing what, and how I might add such a feature That might take ahwhile, because I'm fairly new to Java - but in the meantime, I got an idea...

Since I don't expect to have more than a handful of separate groups (say, five) talking at any given time, why don't I just make five folders and put one copy of the whole voice chat program (including a jar file with the applet) in each folder. I'd set up each of the five server programs to listen at a different port, then write some PHP script to let users identify which rooms are available and retrieve the appropriate applet which talks to the appropriate server in the appropriate folder. Each room would then have its own mini server, etc.

What I am wondering is, would this sort of thing bog the machine down more than an approach where a single voice server handled all the chat rooms? Would it make much difference for a small number of rooms and people? Is it scalable - or will it cause probems veyond some number of rooms (again, vs. a single voice server and a handler to deal with serveral rooms)? Or is this just the way its usually done anyway? I'm going to try it to see what happens, but just wondering if any experts out there had an opinion.
18 years ago
I am working with a server on which the web host installed Apache. Said web host has a tech support department that seems to know less about a lot of stuff than I do, and I'm an absolute and total newbie.

Anyway, I am trying to get Tomcat 4.0.X to work with Apache 2.0 under Linux in order to handle servlets. One of the things you have to do is put the right mod_jk.so file in the $APACHE_HOME/libexec directory. $APACHE_HOME refers, of course, to the name of the home directory for Apache. Now, how do I find out which of my many directories is the Apache home directory? I looked for directories named "libexec" and found two, one under /user, the other under /user/local. I looked in the httpd.conf file and found a statement saying "ServerRoot "/etc/httpd"" that's supposed to be "top of the directory tree under which the server's
# configuration, error, and log files are kept." I also found numerous directoreis and files here with "Apache" in the name.

Which, if any, is the Apache home directory?
18 years ago
http://xxx.xxx.xxx.xxx:8080 doesn't work. Port 8080 is not listed as being listened to when I use "netstat" to get the list. Prior to submitting my first question here, I *did* have to turn Tomcat on, then I restarted Apache (the web host installed it, but just didn't turn it on, apparently). Before I did that, port 8009 was not listed, after I did that, port 8009 is listed as being listened to, presumably Tomcat is now using it to listen for Apache.

Anyway, the server.xml file (see above) does not have anything like a <Connector port="8080" ....> statement. Do I need to type one in, and if so, what is the exact syntax to assign it as the port for communicating with a browser?

As for documentation from the Webhost - almost nonexistent. It's a matter of calling tech support and staying on hold until someone gets around to answering, then you have an approximately 50/50 chance of getting someone who knows what they're talking about. You know the drill. I find forums like this much more helpful - a bit slower, but so far I have plenty of time.

Havn't tried getting the "helloworld" screen directly yet.
18 years ago
Thanks for your reply.

Here's what's in the server.xml file, minus the comments. There are only two references to ports. The first line refers to port 8005, I don't know what its doing. The forth line deals with port 8009. Is it saying that 8009 is for communications with Apache? If so, do I have to put in a similar statement telling Tomcat to use 8080 for browser access to servlets? Or should I be going through Apache somehow??

<Server port="8005" shutdown="SHUTDOWN" debug="0">

<Service name="Tomcat-Apache13">

<Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
port="8009" address="127.0.0.1" minProcessors="5" maxProcessors="75"
enableLookups="true" appBase="webapps"
acceptCount="10" debug="0"/>

<Engine className="org.apache.catalina.connector.warp.WarpEngine"
name="Apache - Tomcat4" defaultHost="defaultHost" debug="0">

<Host name="defaultHost" appbase="/var/www/html">
<Context path="" docBase="" />
</Host>

</Engine>

</Service>
</Server>
18 years ago
I'm having trouble communicating with Tomcat via my browser.

I am using a dedicated server provided by a web host. They installed Apache 2.0, Tomcat 4.somethingorother, (can find out the exact version if anyone needs to know), and J2sdk1,4,2_05. Tomcat is supposedly running under Apache.
The web host uses port 8009 as the default for tomcat.

I turned on Tomcat from the command line and verified that it was listening to port 8009 by listing the open ports. I then restarted Apache. Supposedly, you are supposed to be able to verify that Tomcat is working by using your browser and typing in http://xxx.xxx.xxx.xxx:8009/, (where XXX.XXX.XXX.XXX is my IP address - my domain name is not yet on this server) whereupon you are supposed to get the Tomcat documentation homepage.

Unfortunately, when I use the above url, I get an error messazge saying
"The connection was refused when attempting to contact XXX.XXX.XXX.XXX:8009"

Does anyone know why this might be happening? Might it be some sort of security restriction somewhere? If so where might I look for it? Do I have to use a different URL to access Tomcat when it is running under Apache? A different port?? One source stated that you had to give permission to access Tomcat from a browser in the server.xml file, but that only works when its running as a standalone (and so far I have been unable to find anything telling what I have to type in there to give it permission). Also, what do I do when I want to run a servlet? I tried to access a sample Helloworld servlet in the Tomcat directory but got the same connection refusal error.

As usual the webhost's tech support was of no help at all. Any help would be greatly appreciated.
18 years ago
1)Is any Java program that runs on a server and communicates with a client considered to be a 'servlet'?

2)I have read that Tomcat or Jserv(e?) are needed to run servlets on a server. Is Tomcat a more advanced replacement for Jserv, or are they both up to date alternate means of handling servlets?

3)I want to send a stream of data from an applet to a java program on the server, and have the Java program store the data in a file. Must this Java program be a 'servlet' handled by Tomcat or Jserv?

Thanks.
18 years ago