Meaningless Drivel is fun!
The moose likes JSP and the fly likes what will be the output Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "what will be the output" Watch "what will be the output" New topic

what will be the output

sigamala viswanath

Joined: Mar 13, 2006
Posts: 26

I have one doubt such as :

some servlet calls JSP and in JSP will initialize a servlet below way
Servlet1 s=new Servlet1();
and this in turn calls a jsp and this JSP calls another Servlet.

what will be the output?

Viswanath S
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

Firstly you shouldn't instantiate your own Servlets, that should only be done by the container. As long as something eventually provides output to the client it will work fine, except if it causes an infinite loop or any of the container methods on Servlet1 are called.
jQuery in Action, 3rd edition
subject: what will be the output
jQuery in Action, 3rd edition