aspose file tools*
The moose likes Servlets and the fly likes few questions related to servlet? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "few questions related to servlet?" Watch "few questions related to servlet?" New topic
Author

few questions related to servlet?

Waez Ali
Ranch Hand

Joined: Jan 24, 2005
Posts: 43
Hi,
I got few questions.

1)which are the protocols (except Http) that a servlet can respond to?

2)When should we follow SingleThread Model?

3)Jsp page is translated to which servlet,I mean httpservlet or Generic servlet?

4)Why does init() of servlet passes ServletConfig object to its super class?

5)When should we use ServletConfig object?

I am new to servelts,Please Answer my questions


Thanks.
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
> 1)which are the protocols (except Http) that a servlet can respond to?

The servlet specification does not dictate any protocols. HTTP tends to be the most common implementation for servlet engines though.
It is possible to write servlet engines responding to any protocol, but I've not seen any that I can remember (though maybe some can respond to FTP and/or SMTP and POP3).


> 2)When should we follow SingleThread Model?

I've never yet seen a need for it in 8 years of servlet development

> 3)Jsp page is translated to which servlet,I mean httpservlet or Generic servlet?

Neither. It's translated to JspPage or HttpJspPage depending on whether you are implementing a JSP on HTTP or a generic protocol.

> 4)Why does init() of servlet passes ServletConfig object to its super class?

How else are those superclasses going to get it?

> 5)When should we use ServletConfig object?

When you find a need for it.


42
 
jQuery in Action, 2nd edition
 
subject: few questions related to servlet?