In a JSP page, a statement is declared as follows: <%! String strTemp = request.getParameter("Name"); %> And below that, an expression appears as: <% System.out.println("The Name of person is: "+strTemp); %> What is the output of this expression, if this JSP page is invoked in browser using URL : http://localhost:8080/JSP/TrialPage.jsp?Name=Chetana (Assume that this URL is correct) (a) The Name of person is: Chetana (b) The Name of person is: (c) The Name of person is: null (d) None

(a)

Showing Answers 1 - 4 of 4 Answers

jay patel

  • May 27th, 2006
 

In this case on the page nothing will be displayed as the System.out.println() will display the out put to console. So it may be diplayed in the file of the application server's console output file

  Was this answer useful?  Yes

Mandar Auti

  • Jul 25th, 2006
 

Answer for this question is d that is none. As implecit varible are only accessible in expression and scriptlet tag of jsp which then forms a part of _jspService().

  Was this answer useful?  Yes

Answer is D. Becuase in declartive part <%! %> request object will not be available. If this JSP tries to compile then it'll give an compile time exception: Unrecongnise symbole request.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions