Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question on Servlets

 
Vineela Devi
Ranch Hand
Posts: 191
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Can anyone please tell me whether there is anyway to find the no of Servlets in a given web application?

Regards,
Vineela
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look at the web.xml file?
 
Vineela Devi
Ranch Hand
Posts: 191
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
without looking at web.xml
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why not?

You can also look at the source code or the class files and count how many implement HttpServlet.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think there is anything in the spec for doing this.

Check with the documentation for the container you're using to see what they offer. I know that Tomcat will show you the deployed servlets if you fire up the HTML Manager app and go to Server Status -> Complete Server Status you'll see a list of all the servlets deployed in each application along with some data for each of them.

Mind if I ask why you would want to know this?
 
Vineela Devi
Ranch Hand
Posts: 191
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One of my friends was asked this question in an interview.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic