• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Running Tomcat

 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Instead of running Tomcat with Apache, has anybody had any experience running Tomcat as a standalone server? Can it handle significant amount of connections (like any commercial sites)?
Any sercurity issue that I should be aware of?
 
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Mark,
i m using Tomcat with Windows NT standalone server.I find tomcat very good in that its directory structure is well structured.First few days you wil find it bit tricky but once you are familiar with it,it is the most package based.Another thing is that you create your own we-application in which you put all your classes,thus avoiding mix-up of applications.
For secutity issues think you will have to go through "Server.xml" file and make the necessary changes As far as your application goes you need to make changes in "Web.xml" file.But be careful while creating the directory structure otherwise it will create a lot of mess and you will have to sweat a lot ot resolve the issues.
So then enjoy Tomcat.
 
Mark Leong
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, Vaibhav, for reply.
I intend to run Tomcat on Redhat 6.2 or later. I have managed to set up Tomcat on Win 9x and Redhat but they are mainly for development and therefore not subjected to high volume of traffic. Are you running Tomcat commercially or under production situation? Can you give me a reference website?
Thanks once again.
 
vaibhav punekar
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I m using Tomcat for production purpose only.I ve not used it commersially as well as on Linux.But generally "server.properties " file allows you to set connection pooloing and all the stuff related to JDBC and pool management.I have used weblogic for it.But in Tomcat I think you can edit "Server.xml" file.
 
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Running Tomcat on a production environment is not a good option, as Tomcat performance is quite poor. If serverload is low, it can cope quite well, but as the number of requests goes up, response times go down the drain.
This is especially true for fixed content, but the Java engine is also not one of the better ones.
 
Mark Leong
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks guys.
Jeroen, when you say the number of connections go up, can you give me an indicative figure. To be frank, I am not expecting 100 hits per sec.
 
author
Posts: 621
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I wondered this myself and then I came across this faq reply at jguru
http://www.jguru.com/faq/view.jsp?EID=49745
It might be somewhat exaggerated but if the specs are even half that...

Sean
 
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Sean:
One small caveat, I wanted to point out abt this post....
Solaris/Sparc servers.
This is very important, IMO. Because Apache in its documentation
says that its a reference implementation for Windows (not sure
of linux though). Apache is almost gaurenteed to handle
everything on UNIX.
Hopefully you agree.
My 2 cents.
- satya
 
Mark Leong
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well I guess that settles it. I'll don't think I'll ever hit 100000 hits a day (< 2 hits per seconds).
Thanks guys.
BTW, anybody knows how to connect to PostgreSQL from a remote site? I could connect locally but was refused if try to connect from servlet serving from different machine. I believe there must be something I need to set at the config file.
 
vaibhav punekar
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Maybe you are still trying with localhost:8080.Try giving IP adderss of server m/c on which Tomcat is installed.Try giving dynamic path to your servlet/JSP.eg. ./../../ like this according to your directry structure,instead of "http://localhost:8080/appfolder/sth.jsp".If still does not work post your code.I hope this will help.
 
Mark Leong
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Vaibhav.
From the error message, I am very sure I connected to the db and was refused - the driver and connection url is therefore correct. I must configure PostgreSQL to accept connections from other machines.
 
Sean MacLean
author
Posts: 621
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Satya,
Your point is well taken. I turned a blind eye to the platform in question (mistakenly) because when I think Tomcat, I think Apache and then unix, since it is such a common setup.
Sean
 
reply
    Bookmark Topic Watch Topic
  • New Topic