• Post Reply Bookmark Topic Watch Topic
  • New Topic

feeewww more doubts  RSS feed

vasu dev
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
2. <%@ taglib uri='example' prefix='example' %>
3. <example:emptyBodyTag/>

If the tag handler for the emptyBodyTag extends javax.servlet.jsp.tagext.BodyTagSupport and overrides the doEndTag method, how many times is that method invoked?
<%! double randomNumber = Math.random(); %>
<% out.println(randomNumber); %>
Where will the randomNumber be declared in the translated servlet?
will it be in the service method or _jspinit method or _jspService method or in the translated servlet class definition?
<%! int j = 0; %>
<% j = 4; %>
Number: <%= ++j =%>
what is the result?
<% boolean b = true; %>
<% if ( %>YYYY<% ) %>
which can replace YYYY without causing an error?
05.What are the attributes of the taglib directive?
06.Which includes a file in a JSP page at translation time?
07.Assume object A implements the HttpSessionActivationListener interface and that it has been placed in a session.

Which two methods are invoked on A as a result of the servlet container migrating that session from one Java Virtual Machine to another in a districutable Web application?
08.A Web application is located in a directory named test.
Where must JAR files be located to be loaded automatically by the servlet container?
09.Within a Web application deployment descriptor, what is the name of an element that can contain an <error-page> element?
2. JumpingBean bean = new JumpingBean("Jump");
3. session.setAttribute("bean", bean);
4. String name = request.getParameter("name");
5. if(name != null)
6. bean.setName(name);
7. %>

Which line contains functionality NOT availale from a standard JSP action or directive?
11.Given a tab library with the following tag:

. a tag called getTitle that has one attribute called
hierarchy that DOES NOT accept a dynamic value
What is the value of the hierarchy property as a result of evaluating the following JSP code?

3. <% String chapter = "chap1"; %>
4. <mT:getTitle hierarchy="<%= chapter %>"/>
Vishwa Kumba
Ranch Hand
Posts: 1066
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. -
2. Translated Servlet class Defn. (randomNumber becomes an instance variable)
3. Compile time error due to incorrect jsp expression syntax :
Number: <%= ++j =%>
4. <% b %>
5. prefix and uri
6. <jsp:include>
7. sessionWillPassivate(HttpSessionEvent evt)
sessionDidActivate(HttpSessionEvent evt)
8. test\WEB-INF\lib
9. web-app
10. -
11. Error at jsp page translation time.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!