Tomcat Query From Complete Newbie

Home » CentOS » Tomcat Query From Complete Newbie
CentOS 3 Comments

I’m a complete tomcat beginner – (I installed it on my CentOS-6.3 server this morning.) According to the web-interface on port 8080 tomcat is running fine.

Basically, I want to allow a Java program I have written (which works well) to be run over the internet. This is to test students understanding of Turing machines. The student has to enter a short “program” (consisting of 20-80 “quadruples”). My program will then test if the program does what it is meant to do. So the student enters his program (about 1k), eg by pasting from a file – the program should then run, and the student should see what it outputs.

I’m looking for advice on the best way to set this up. As I understand it, tomcat can either be run “standalone” or “behind apache”. I am running httpd on the server, so either method should be available. It seems that the standalone option is simpler, so I would probably prefer that.

Any and all suggestions gratefully received.

3 thoughts on - Tomcat Query From Complete Newbie

  • On the tomcat side there really isn’t any difference. The reason you would run behind apache would be to permit running all http connections over port 80, while letting apache handle some URL’s internally and proxying other paths to other programs. If port 8080
    is open and you don’t need to restrict access to other tomcat apps you might as well go direct.

  • the main reason to run ‘behind apache’ is so static content can be delivered by apache which is more efficient at that, and only dynamic content is pushed through Tomcat.

    If you’re just providing ‘webapp’ APIs, there’s no reason to not run it directly.

  • Les Mikesell wrote:

    Thanks very much for the responses.

    I was rather frustrated when I wrote as I had visited several – probably a dozen or more –
    tutorial sites after googling for “tomcat jsp”, and I was astonished at the quantity of useless or just incorrect advice I received –
    not saying where files should be located, what port to use, etc. Fortunately after many misadventures I found
    which explained everything clearly.