Top 250+ Solved Advanced JAVA MCQ Questions Answer

From 61 to 75 of 223

Q. Which methods are used to bind the objects on HttpSession instance andgetthe objects?

a. setattribute

b. getattribute

c. both a & b

d. none of the above

  • c. both a & b

Q. Which type of ServletEngine is a server that includes built-in support forservlets?

a. add-on servletengine

b. embedded servletengine

c. standalone servletengine

d. none of the above

  • c. standalone servletengine

Q. What type of servlets use these methods doGet(), doPost(),doHead, doDelete(),doTrace()?

a. genereic servlets

b. httpservlets

c. all of the above

d. none of the above

  • b. httpservlets

Q. Which cookie it is valid for single session only and it is removed each timewhen the user closes the browser?

a. persistent cookie

b. non-persistent cookie

c. all the above

d. none of the above

  • b. non-persistent cookie

Q. Which action tags are used in JSP for developing web application with JavaBean?

a. jsp:usebean

b. jsp:setproperty

c. jsp:getproperty

d. both b & c

  • d. both b & c

Q. Which technology do we mix our business logic with the presentation logic?

a. servlet

b. jsp

c. both a & b

d. none of the above

  • a. servlet

Q. Which tag is used to execute java source code in JSP?

a. declaration tag

b. scriptlet tag

c. expression tag

d. none of the above

  • b. scriptlet tag

Q. Which JSP Action tags is used to include the content of another resource,itMay be jsp, html or servlet?

a. jsp:include

b. jsp:forward

c. jsp:plugin

d. jsp:papam

  • a. jsp:include

Q. A JSP page consists of which tags?

a. html tags

b. jsp tags

c. both a & b

d. none of the above

  • c. both a & b

Q. What alternatives exist to embedding Java code directly within the HTMLmarkup of your JSP page?

a. moving the code into your session manager.

b. moving the code into scriptlets.

c. moving the code into javabeans and servlets.

d. moving the code into a transaction manager.

  • c. moving the code into javabeans and servlets.

Q. What type of scriptlet code is better-suited to being factored forward into aservlet?

a. code that deals with logic that is common across requests.

b. code that deals with logic that is vendor specific)

c. code that deals with logic that relates to database access.

d. code that deals with logic that relates to client scope.

  • a. code that deals with logic that is common across requests.

Q. Which of the scripting of JSP not putting content into service method of theconverted servlet?

a. declarations

b. scriptlets

c. expressions

d. none of the above

  • a. declarations
Subscribe Now

Get All Updates & News