• 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

how does tomcat 'know' what goes to the container and what doesn't ?

 
Ranch Hand
Posts: 159
Eclipse IDE C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I have a question about the container and the webserver...

When a request comes in, how does tomcat 'know' it's for the web container ?
how does it decide to that it should send it to the web container ? if I have a servlet with url-pattern the same as an available html page,
how does it decide what to do ?

Can tomcat have multiple webcontainers ? and of course then comes the question: how does it know what to send to what ?

I'm a bit confused on this (but havn't finished the book yet ,perhaps they'll talk about it later?)

Could anyone explain this please ?

thanks!
 
Sheriff
Posts: 9707
43
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to clear first what a servlet container and web server is. Look at this FAQ...
 
Mark Uppeteer
Ranch Hand
Posts: 159
Eclipse IDE C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ankit Garg,

thanks for your reply.

I think I know the difference between the web container and a webserver.
What did I say that didn't make sence to you ?

How I understand it:
The web server accepts the connection, "looks" if it is just a simple static get and it can serve it.
If not it forwards it (over socket) to the web container who handles it and sends back the reply.
This brings me back to my question, how does it know if it is for the container or not, and say it has a CGI container also,
how does it know where the request has to go ?
 
Ranch Hand
Posts: 754
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't know your answer, but I know that this kind of question was not in my test! =P

Try to post you question in another Java Forums Topic here in JavaRanch.
reply
    Bookmark Topic Watch Topic
  • New Topic