• Post Reply Bookmark Topic Watch Topic
  • New Topic

some questions  RSS feed

 
amit sanghai
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have some questions:
1) What does page scope in JSP map to in Servlets?
2) Can we explicitly destroy a servlet?
3) How do servlets handle non HTTP requests?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's some info:

1) What does page scope in JSP map to in Servlets?

Nothing. There's no concept of a page in a servlet.

2) Can we explicitly destroy a servlet?

I was unable to find any API to perform this action.

3) How do servlets handle non HTTP requests?

Have never worked in any other protocol, so I don't know about this one. The HttpServlet derives from a GenericServlet so the possibility to handle non-HTTP protocols is present. Perhaps it might ring someone's bell if you expand on the environment you are working in.
hth,
bear
[ May 02, 2003: Message edited by: Bear Bibeault ]
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Explicitly removing a servlet is outside the servlet API and into the web application management area. Tomcat provides a management interface that let you stop a servlet or reload it and I imagine most servlet containers provide the same. The servlet container is supposed to call your servlet's destroy() method to give you a last chance to clean up.
Bill
 
Murali Nanchala
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just override the service() method of a GenericServlet and you are ready to use a protocol independant servlet.
What clients do you have in mind for such a servlet?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!