my dog learned polymorphism*
The moose likes Servlets and the fly likes Question on Servlets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Question on Servlets" Watch "Question on Servlets" New topic
Author

Question on Servlets

Vineela Devi
Ranch Hand

Joined: Dec 20, 2003
Posts: 191
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
Marshal

Joined: Mar 22, 2005
Posts: 41016
    
  43
Look at the web.xml file?


Ping & DNS - my free Android networking tools app
Vineela Devi
Ranch Hand

Joined: Dec 20, 2003
Posts: 191
without looking at web.xml
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41016
    
  43
Why not?

You can also look at the source code or the class files and count how many implement HttpServlet.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

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?


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Vineela Devi
Ranch Hand

Joined: Dec 20, 2003
Posts: 191
One of my friends was asked this question in an interview.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Question on Servlets
 
Similar Threads
Downloading HTML page
Un-downloadable Applets
WA #1.....word association
a jsp design question...
server side processing error