• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Bear Bibeault
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • salvin francis
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
Bartenders:
  • Jj Roberts
  • Carey Brown
  • Scott Selikoff

Understanding Tomcat

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

Tomcat by itself is a web server. This means that you can use Tomcat to service HTTP requests for servlets, as well as static files (HTML, image files, and so on). In practice, however, since it is faster for non-servlet, non-JSP requests, Tomcat normally is used as a module with another more robust web server, such as Apache web server or Microsoft Internet Information Server.
Only requests for servlets or JSP pages are passed to Tomcat.



Problem Statement according to the above lines from a book:
It is not clear, if request for servlets and jsp pages are passed to tomcat than how does it process to the non-servlet and no-jsp request and for the static files as well? If http request is not used in this case than how it is processed and how it fast for the same i.e. for the static content and for the non-jsp and non-servlet request?

Why Http protocol is preffered to the request and response of jsp and servlet pages?
 
Sheriff
Posts: 67503
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Your question doesn't make much sense. It all uses HTTP.

That quote (which I put into a quote block, by the way, to make it clear that it's not your writing) is just saying that some HTTP requests a handled by Apache or IIS while other are routed to Tomcat. It's all still HTTP.

This is only, of course, if configured as such. Tomcat is perfectly capable of handling all requests.
 
Jdinesh Tiwari
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for the clarification.
 
Saloon Keeper
Posts: 23282
158
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How old is your book? It has been a VERY LONG time since static content (non servlet/JSP) was recommended to be sent by something other than Tomcat. The only reasons that you need to pair Tomcat with a non-J2EE webserver these days are if you want a single point to server both J2EE and non-J2EE (cgi, php, and so forth). OR if you want to avoid running Tomcat as a privileged user (root) and still have it handle requests for ports 80 and 443.

Tomcat's static delivery has been perfectly acceptable for well over 10 years now.

 
Ranch Hand
Posts: 75
Tomcat Server Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

How old is your book?



quick google and looks like the quote from this thread comes from:

Java for the Web with Servlets, JSP, and EJB.
A Developer's Guide to Scalable J2EE Solutions
by Budi Kurniawan, (c) 2002 by New Riders Publishing

Tomcat's static delivery has been perfectly acceptable for well over 10 years now.



here's you go, book is 11 years old
 
Jdinesh Tiwari
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks to all. Yes the book is old enough.
 
And inside of my fortune cookie was this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic