• 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 tomat know that the project is STRUTS or Ordinary JSP/Servlet application

 
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When we deploy our application in Webapps of tomcat then

how does the tomcat know it is Struts application or it is Jsp/Servlet Applciation..
or it is stpring frame work application


can any one tell me this..

how does tomcat know...

what tomcat willl read first or by seeing what the tomcat.. recognize the framwork

ok bye
Thanks in advance.. bye
tc
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tomcat doesn't know or care what framework you are using. The web.xml tells Tomcat where to send requests.
 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To expand on the previous answer, the web.xml is read at startup, and this contains sections which tell Tomcat how to map requests to servlets. There can be more than one type of servlet used by Tomcat...I'm not sure if there is a limit or not. In the example below, several servlets are declared and mapped, and in the case of the "action" servlet, we are declaring a custom servlet that extends the struts ActionServlet. Example:

 
He's dead Jim. Grab his tricorder. I'll get his wallet and this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic