File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

few questions related to servlet?

 
Waez Ali
Ranch Hand
Posts: 43
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5093
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
> 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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic