This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
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

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
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.
I agree. Here's the link:
subject: what will be the output
It's not a secret anymore!