This week's book giveaway is in the Cloud forum.
We're giving away four copies of The Business Blockchain and have William Mougayar on-line!
See this thread for details.
Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

few more doubts

 
vasu devre
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
01. which will create a bean to be used only in this JSP page to process the user's request?
02. which J2ee design pattern improves response time and reduces network traffic for accessing coarse-grained read-only data?
03. you have taken over the development of a Web application in which all of the jsp pages use embedded JDBC calls to access the database.
which design pattern would allow you to decompile the database from the JSP pages and encapsulate the JDBC calls?
04. in the init method of a servlet, which exception is thrown to indicate that the servlet is not ready to be placed into service?
05. <html><body>
<form method="post" action="/servlet/TestServlet">
<input type="text" name="nameField">
<input type="submit">
</form>
</body></html>

which method will access the value of the User-Agent HTTP header?
06. by default, the body of a jsp custom tag is evaluated by the servlet container before it is made available to that tag. which constant can be specified for the <body-content> element in the tag library descriptor to prevent this evaluation?
07. you are developing a web application to sell automobiles on the internet. the information about each car will be displayed in a jsp page, which will use an object called autodetail to store information about the car. the information in the autodetail object will not change, but is stored on a remote server.

which design pattern should be used for the autodetail object?

08. when specified in a web application deployment descriptor, which type of listener will have no impact on application behavior?
09. which jsp tag can an int be declared?
10.which element name is used in the web application deployment descriptor to specify access to a custom tag library?
11.which static value from the javax.servlet.jsp.tagext.Tag interface must be returned from a tag handler's doEndTag method so that the rest of the JSP page following the tag is processed?
 
somkiat puisungnoen
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. <jsp:useBean name="bean1" class="test" scope="page" /> or
<jsp:useBean name="bean1" class="test" />
2. Value Object(VO) or Transfer Object (TO)
3. <servlet>
...
<init-param>
<param-name>aaa</param-name>
<param-value>aaa</param-value>
</init-param>
...
</servlet>
or
<context-param>
<param-name>aaa</param-name>
<param-value>aaa</param-value>
</context-param>
4. all exception are wrapped in javax.servlet.ServletException
5. getHeader(String param)
6. empty
7. Value Object(VO) or Transfer Object(TO)
8. javax.servlet.ServletException
9. jsp ecaration, jsp:scriptlet
10. <taglib>
<taglib-uri/>
<taglob-location/>
</taglib>
11. Tag.EVAL-PAGE
 
Vishwa Kumba
Ranch Hand
Posts: 1066
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My view :
1. useBean tag with page scope.
example :
<jsp:useBean id="bean1" class="test" />
- default is page scope and the the attribute is "id" and not "name".
2. ValueObject
3. Data Access Object
4. ServletException
5. getHeader()
6. tagdependent
7. ValueObject
8. --
9. jsp declaration, jsp scriptlet.
10.taglib
11. EVAL_PAGE
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic