views:

27

answers:

1

I currently have a java applet sitting on my Apache server (in the htdocs directory). The applet is a web crawler and takes a very long time to process before delivering results (I guess applets get very limited resources).

I would like to push the crawling work onto the server but I don't have any idea how to do this. I know that I can make a Servlet maybe using Tomcat or something like that but I don't know what would be involved.

Do I need to install Tomcat (or is this part of Apache)?

Is this something that can be done in several hours (the first time)? Or will this take me some time to do?

Currently my applet is at http://mySite.ca:4005/crawler/. I only have access to port 4005 (other users get the other ports). Would Tomcat play nice Apache? Can I direct requests to http://mySite.ca:4005/crawler/ to tomcat and allow Apache to handle the rest of the requests (ie: requests to http://mySite.ca:4005/otherPage/)?

I don't really care about the applet/GUI code that I have written, my main objective is to get the webcrawler running with some arguments (input from user) and then display the results (output to user).

+1  A: 

Do I need to install Tomcat (or is this part of Apache)?

Tomcat is not part of Apache HTTPD, you need to install it separately. Check Tomcat homepage for details. Note that you could also use other servers to run servlets, e.g. Jetty

Is this something that can be done in several hours (the first time)? Or will this take me some time to do?

This depends on your familiarity with computers and your particular operating system. I would do it in couple of minutes. :-P

Currently my applet is at http://mySite.ca:4005/crawler/. I only have access to port 4005 (other users get the other ports). Would Tomcat play nice Apache?

In general, Tomcat has been designed to be integrated with Apache HTTPD, see the documentation about connectors and connectors website for details.

I'm not sure about assigning different ports to different users, I do not think this is the proper way to do this. What exactly are you trying to achieve here?

Can I direct requests to http://mySite.ca:4005/crawler/ to tomcat and allow Apache to handle the rest of the requests (ie: requests to http://mySite.ca:4005/otherPage/)?

Yes you can. Check the Connectors guide and Apache HTTPD Location directive for details.

I would advise you to use plain HTTP to communicate between your applet and servlet.

Neeme Praks