• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Tomcat settings in an production environment?

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm currently about to go live with a webapp I've been working on for some time. I'm using Tomcat 5.5.1.7 as a server, and in that regard I've got some questions.

Should I place my webapp under the ROOT folder in Tomcat?
$CATALINA_HOME/webapps/ROOT/

If not how else can I get the webapp to be displayed at the Tomcat root? I.e http://www.mysite.com/ and not http://www.mysite.com/mywebapp/

Are there any other Tomcat settings that needs to be changed in an production environment?

All advices are much appreciated!
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Renaming your webapp to ROOT and placing under the webapps directory is the easiest way to deploy it as the root app on the server.

Tomcat, pretty much ships in production mode.
I usually change thing more for development mode.

You might want to un-deploy any of the apps that ship with Tomcat (unless you're actually using them).

I keep the manager app around but I re-name it.
I also turn off directory browsing (from conf/web.xml) and build my own 404 error page that doesn't show the make and model of the appserver to any would be cracker.
 
Egil Poma
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for the informative reply!

How can I prevent Tomcat from displaying stack traces in case of unforeseen errors? Is that also in conf/web.xml perhaps?

Do you have any idea how the performance on Tomcat is compared to other lightweight servers (like i.e. Resin).
[ September 23, 2006: Message edited by: Egil Poma ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can create a custom 500 error page (as well as a custom 404 error page) for you app and map them with the web.xml file under your app's WEB-INF directory.

Example:
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The default servlet, is mapped in the tomcat/conf/web.xml.
This is where you would shut off directory browsing for all of Tomcat.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic