SlideShare a Scribd company logo
JSP MCQ QUESTION
WITH ANSWER
J2EE
1. Which option is true about session
scope?
◦ A. Objects are accessible only from the page in which they are created
◦ B. Objects are accessible only from the pages which are in same session
◦ C. Objects are accessible only from the pages which are processing the same
request
◦ D. Objects are accessible only from the pages which reside in same
application
◦ Answer: B
2. Which of the scripting of JSP not putting
content into service method of the
converted servlet?
◦A. Declarations
◦B. Scriptlets
◦C. Expressions
◦D. None of the above
◦ Answer: C
3. Why is XML a good way to transfer text-
based data from one program or tool to
another?
◦ A. XML imposes important limitations on the receiving program or
tool
◦ B. The receiving program or tool can use the XML tagging
information to determine how to best handle the incoming data
◦ C. XML tags offer an extra level of security
◦ D. XML tags specify to the receiving program or tool exactly how to
format and display the data
◦ Answer: B
4. The method forward(request,
response) will
◦ A. return back to the same method from where the forward was
invoked
◦ B. not return back to the same method from where the forward was
invoked and the web pages navigation continues
◦ C. Both A and B are correct
◦ D. None of the above
◦ Answer: A
5. The difference between Servlets
and JSP is the …………….
◦A. translation
◦B. compilation
◦C. syntax
◦D. Both A and B
◦ Answer: C
6. Which of the following are the valid
scopes in JSP?
◦A. request, page, session, application
◦B. request, page, session, global
◦C. response, page, session, application
◦D. request, page, context, application
◦ Answer: A
7. JSP includes a mechanism for
defining ……………. or custom tags.
◦A. static attributes
◦B. local attributes
◦C. dynamic attributes
◦D. global attributes
◦ Answer: C
8. Which describes best an EJB
handle?
◦ A. An EJB handle is used to handle exceptions when accessing EJB
objects
◦ B. An EJB handle is used to store a reference to a specific EJB object
◦ C. An EJB handle is part of the Home interface
◦ D. An EJB handle is used for local references inside the EJB container
◦ Answer: B
9. Why DB connections are not
written directly in JSPs?
◦A. Response is slow
◦B. Not a standard J2EE architecture
◦C. Load Balancing is not possible
◦D. Both B and C
◦ Answer: D
10. How many jsp implicit objects are there
and these objects are created by the web
container that are available to all the jsp
pages?
◦A. 8
◦B. 9
◦C. 10
◦D. 7
◦ Answer: B
11. Why use Request Dispatcher to forward a
request to another resource, instead of using a
sendRedirect?
◦ A. Redirects are no longer supported in the current servlet API
◦ B. Redirects are not a cross-platform portable mechanism
◦ C. The RequestDispatcher does not use the reflection API
◦ D. The RequestDispatcher does not require a round trip to the client, and
thus is more efficient and allows the server to maintain request state
◦ Answer: D
12. Which is not a directive?
◦A. include
◦B. page
◦C. export
◦D. useBean
◦ Answer: C
13. Which attribute specifies a JSP page that should
process any exceptions thrown but not caught in the
current page?
◦A. The ErrorPage Attribute
◦B. The IsErrorPage Attribute
◦C. Both A & B
◦D. None of the above
◦ Answer: A
14. Which http method send by browser that
asks the server to get the page only?
◦A. get
◦B. post
◦C. option
◦D. put
◦ Answer: A
15. JDBC is a ……… interface, which means that it is
used to invoke SQL commands directly
◦A. low-level
◦B. middle-level
◦C. higher-level
◦D. user
◦ Answer: A
16. Which can generate HTML dynamically on the client but
can hardly interact with the web server to perform complex
tasks like database access and image processing etc. in JSP?
◦A. vs.Static HTML
◦B. vs.Server-Side Includes
◦C. vs.Pure Servlets
◦D. Vs.JavaScript
◦ Answer: D
17. What is JDBC?
◦A. java compiler
◦B. Java API
◦C. Java interpreter
◦D. Both A and B
◦ Answer: B
18. Dynamic interception of requests and
responses to transform the information is
done by
◦A. servlet container
◦B. servlet config
◦C. servlet context
◦D. servlet filter
◦ Answer: D
19. What type of scriptlet code is better-suited to
being factored forward into a servlet?
◦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
◦ Answer: A
20. This is a software distribution model in which applications
are hosted by a vendor or service provider and made available
to customers over a network, typically the Internet.
◦A. Platform as a Service (PaaS)
◦B. Infrastructure as a Service (IaaS)
◦C. Software as a Service (SaaS)
◦D. None
◦ Answer: C
21. What is the initial contact point for
handling a web request in a Page-Centric
architecture?
◦A. A JSP page
◦B. A JavaBean
◦C. A servlet
◦D. A session manager
◦ Answer: A
22. Java Soft provides ……... JDBC product
components as part of the java Developer’s Kit
(JDK)
◦A. three
◦B. two
◦C. four
◦D. single
◦ Answer: A
23. How to send data in get method?
◦A. We can't
◦B. Through url
◦C. Through payload
◦D. None of these
◦ Answer: B
24. What is the name of the organization
helping to foster security standards for cloud
computing?
◦A. Cloud Security Standards Working
◦B. Cloud Security Alliance
◦C. Cloud Security Watchdog
◦D. Security in the Cloud Alliance
◦ Answer: B
25. Which of the following statements is true
regarding the scope of 'request' in JSP?
◦ A. Objects with request scope are accessible from pages processing the same
request where they were created
◦ B. All references to the object shall be released after the request is processed; in
particular, if the request is forwarded to a resource in the same run time, the
object is still reachable
◦ C. References to objects with request scope are stored in the request object
◦ D. All of the above
◦ Answer: D
THANK YOU

More Related Content

Similar to JSP MCQ Question with Answer

Chap3 3 12
Chap3 3 12Chap3 3 12
Chap3 3 12
Hemo Chella
 
Jdbcdriver
JdbcdriverJdbcdriver
Javascript Question
Javascript QuestionJavascript Question
java.pptx
java.pptxjava.pptx
java.pptx
bfgd1
 
Unit 5-jdbc2
Unit 5-jdbc2Unit 5-jdbc2
Unit 5-jdbc2
msafad
 
JDBC
JDBCJDBC
hi
hihi
Jdbc ppt
Jdbc pptJdbc ppt
Jdbc ppt
Vikas Jagtap
 
Jdbc
JdbcJdbc
JDBC java database connectivity with dbms
JDBC java database connectivity with dbmsJDBC java database connectivity with dbms
JDBC java database connectivity with dbms
KhyalNayak
 
Core jdbc basics
Core jdbc basicsCore jdbc basics
Core jdbc basics
Sourabrata Mukherjee
 
Jdbc introduction
Jdbc introductionJdbc introduction
Jdbc introduction
Rakesh Kumar Ray
 
Advanced JAVA
Advanced JAVAAdvanced JAVA
Advanced JAVA
Rajvi Vaghasiya
 
10 J D B C
10  J D B C10  J D B C
10 J D B C
guest04b824
 
jdbc Java Database Connectivity ujjwal matoliya jdbc.pptx
 jdbc Java Database Connectivity ujjwal matoliya jdbc.pptx jdbc Java Database Connectivity ujjwal matoliya jdbc.pptx
jdbc Java Database Connectivity ujjwal matoliya jdbc.pptx
ujjwalmatoliya
 
Session 34 - JDBC Best Practices, Introduction to Design Patterns
Session 34 - JDBC Best Practices, Introduction to Design PatternsSession 34 - JDBC Best Practices, Introduction to Design Patterns
Session 34 - JDBC Best Practices, Introduction to Design Patterns
PawanMM
 
GDSC Backend Bootcamp.pptx
GDSC Backend Bootcamp.pptxGDSC Backend Bootcamp.pptx
GDSC Backend Bootcamp.pptx
SaaraBansode
 
Jdbc 1
Jdbc 1Jdbc 1
java database connection (jdbc)
java database connection (jdbc)java database connection (jdbc)
java database connection (jdbc)
Sanjay Gunjal
 
Jdbc
JdbcJdbc

Similar to JSP MCQ Question with Answer (20)

Chap3 3 12
Chap3 3 12Chap3 3 12
Chap3 3 12
 
Jdbcdriver
JdbcdriverJdbcdriver
Jdbcdriver
 
Javascript Question
Javascript QuestionJavascript Question
Javascript Question
 
java.pptx
java.pptxjava.pptx
java.pptx
 
Unit 5-jdbc2
Unit 5-jdbc2Unit 5-jdbc2
Unit 5-jdbc2
 
JDBC
JDBCJDBC
JDBC
 
hi
hihi
hi
 
Jdbc ppt
Jdbc pptJdbc ppt
Jdbc ppt
 
Jdbc
JdbcJdbc
Jdbc
 
JDBC java database connectivity with dbms
JDBC java database connectivity with dbmsJDBC java database connectivity with dbms
JDBC java database connectivity with dbms
 
Core jdbc basics
Core jdbc basicsCore jdbc basics
Core jdbc basics
 
Jdbc introduction
Jdbc introductionJdbc introduction
Jdbc introduction
 
Advanced JAVA
Advanced JAVAAdvanced JAVA
Advanced JAVA
 
10 J D B C
10  J D B C10  J D B C
10 J D B C
 
jdbc Java Database Connectivity ujjwal matoliya jdbc.pptx
 jdbc Java Database Connectivity ujjwal matoliya jdbc.pptx jdbc Java Database Connectivity ujjwal matoliya jdbc.pptx
jdbc Java Database Connectivity ujjwal matoliya jdbc.pptx
 
Session 34 - JDBC Best Practices, Introduction to Design Patterns
Session 34 - JDBC Best Practices, Introduction to Design PatternsSession 34 - JDBC Best Practices, Introduction to Design Patterns
Session 34 - JDBC Best Practices, Introduction to Design Patterns
 
GDSC Backend Bootcamp.pptx
GDSC Backend Bootcamp.pptxGDSC Backend Bootcamp.pptx
GDSC Backend Bootcamp.pptx
 
Jdbc 1
Jdbc 1Jdbc 1
Jdbc 1
 
java database connection (jdbc)
java database connection (jdbc)java database connection (jdbc)
java database connection (jdbc)
 
Jdbc
JdbcJdbc
Jdbc
 

More from ASG

Angular jS Introduction by Google
Angular jS Introduction by GoogleAngular jS Introduction by Google
Angular jS Introduction by Google
ASG
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
ASG
 
Dependency Injection in Spring
Dependency Injection in SpringDependency Injection in Spring
Dependency Injection in Spring
ASG
 
1. Spring intro IoC
1. Spring intro IoC1. Spring intro IoC
1. Spring intro IoC
ASG
 
Rajshahi college (Golam Hossen)
Rajshahi college (Golam Hossen)Rajshahi college (Golam Hossen)
Rajshahi college (Golam Hossen)
ASG
 
Call center technology(She Power Project)
Call center technology(She Power Project)Call center technology(She Power Project)
Call center technology(She Power Project)
ASG
 
20th clubs joint quiz competition
20th clubs joint quiz competition20th clubs joint quiz competition
20th clubs joint quiz competition
ASG
 

More from ASG (7)

Angular jS Introduction by Google
Angular jS Introduction by GoogleAngular jS Introduction by Google
Angular jS Introduction by Google
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
 
Dependency Injection in Spring
Dependency Injection in SpringDependency Injection in Spring
Dependency Injection in Spring
 
1. Spring intro IoC
1. Spring intro IoC1. Spring intro IoC
1. Spring intro IoC
 
Rajshahi college (Golam Hossen)
Rajshahi college (Golam Hossen)Rajshahi college (Golam Hossen)
Rajshahi college (Golam Hossen)
 
Call center technology(She Power Project)
Call center technology(She Power Project)Call center technology(She Power Project)
Call center technology(She Power Project)
 
20th clubs joint quiz competition
20th clubs joint quiz competition20th clubs joint quiz competition
20th clubs joint quiz competition
 

Recently uploaded

Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
Zilliz
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 

Recently uploaded (20)

Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 

JSP MCQ Question with Answer

  • 1. JSP MCQ QUESTION WITH ANSWER J2EE
  • 2. 1. Which option is true about session scope? ◦ A. Objects are accessible only from the page in which they are created ◦ B. Objects are accessible only from the pages which are in same session ◦ C. Objects are accessible only from the pages which are processing the same request ◦ D. Objects are accessible only from the pages which reside in same application ◦ Answer: B
  • 3. 2. Which of the scripting of JSP not putting content into service method of the converted servlet? ◦A. Declarations ◦B. Scriptlets ◦C. Expressions ◦D. None of the above ◦ Answer: C
  • 4. 3. Why is XML a good way to transfer text- based data from one program or tool to another? ◦ A. XML imposes important limitations on the receiving program or tool ◦ B. The receiving program or tool can use the XML tagging information to determine how to best handle the incoming data ◦ C. XML tags offer an extra level of security ◦ D. XML tags specify to the receiving program or tool exactly how to format and display the data ◦ Answer: B
  • 5. 4. The method forward(request, response) will ◦ A. return back to the same method from where the forward was invoked ◦ B. not return back to the same method from where the forward was invoked and the web pages navigation continues ◦ C. Both A and B are correct ◦ D. None of the above ◦ Answer: A
  • 6. 5. The difference between Servlets and JSP is the ……………. ◦A. translation ◦B. compilation ◦C. syntax ◦D. Both A and B ◦ Answer: C
  • 7. 6. Which of the following are the valid scopes in JSP? ◦A. request, page, session, application ◦B. request, page, session, global ◦C. response, page, session, application ◦D. request, page, context, application ◦ Answer: A
  • 8. 7. JSP includes a mechanism for defining ……………. or custom tags. ◦A. static attributes ◦B. local attributes ◦C. dynamic attributes ◦D. global attributes ◦ Answer: C
  • 9. 8. Which describes best an EJB handle? ◦ A. An EJB handle is used to handle exceptions when accessing EJB objects ◦ B. An EJB handle is used to store a reference to a specific EJB object ◦ C. An EJB handle is part of the Home interface ◦ D. An EJB handle is used for local references inside the EJB container ◦ Answer: B
  • 10. 9. Why DB connections are not written directly in JSPs? ◦A. Response is slow ◦B. Not a standard J2EE architecture ◦C. Load Balancing is not possible ◦D. Both B and C ◦ Answer: D
  • 11. 10. How many jsp implicit objects are there and these objects are created by the web container that are available to all the jsp pages? ◦A. 8 ◦B. 9 ◦C. 10 ◦D. 7 ◦ Answer: B
  • 12. 11. Why use Request Dispatcher to forward a request to another resource, instead of using a sendRedirect? ◦ A. Redirects are no longer supported in the current servlet API ◦ B. Redirects are not a cross-platform portable mechanism ◦ C. The RequestDispatcher does not use the reflection API ◦ D. The RequestDispatcher does not require a round trip to the client, and thus is more efficient and allows the server to maintain request state ◦ Answer: D
  • 13. 12. Which is not a directive? ◦A. include ◦B. page ◦C. export ◦D. useBean ◦ Answer: C
  • 14. 13. Which attribute specifies a JSP page that should process any exceptions thrown but not caught in the current page? ◦A. The ErrorPage Attribute ◦B. The IsErrorPage Attribute ◦C. Both A & B ◦D. None of the above ◦ Answer: A
  • 15. 14. Which http method send by browser that asks the server to get the page only? ◦A. get ◦B. post ◦C. option ◦D. put ◦ Answer: A
  • 16. 15. JDBC is a ……… interface, which means that it is used to invoke SQL commands directly ◦A. low-level ◦B. middle-level ◦C. higher-level ◦D. user ◦ Answer: A
  • 17. 16. Which can generate HTML dynamically on the client but can hardly interact with the web server to perform complex tasks like database access and image processing etc. in JSP? ◦A. vs.Static HTML ◦B. vs.Server-Side Includes ◦C. vs.Pure Servlets ◦D. Vs.JavaScript ◦ Answer: D
  • 18. 17. What is JDBC? ◦A. java compiler ◦B. Java API ◦C. Java interpreter ◦D. Both A and B ◦ Answer: B
  • 19. 18. Dynamic interception of requests and responses to transform the information is done by ◦A. servlet container ◦B. servlet config ◦C. servlet context ◦D. servlet filter ◦ Answer: D
  • 20. 19. What type of scriptlet code is better-suited to being factored forward into a servlet? ◦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 ◦ Answer: A
  • 21. 20. This is a software distribution model in which applications are hosted by a vendor or service provider and made available to customers over a network, typically the Internet. ◦A. Platform as a Service (PaaS) ◦B. Infrastructure as a Service (IaaS) ◦C. Software as a Service (SaaS) ◦D. None ◦ Answer: C
  • 22. 21. What is the initial contact point for handling a web request in a Page-Centric architecture? ◦A. A JSP page ◦B. A JavaBean ◦C. A servlet ◦D. A session manager ◦ Answer: A
  • 23. 22. Java Soft provides ……... JDBC product components as part of the java Developer’s Kit (JDK) ◦A. three ◦B. two ◦C. four ◦D. single ◦ Answer: A
  • 24. 23. How to send data in get method? ◦A. We can't ◦B. Through url ◦C. Through payload ◦D. None of these ◦ Answer: B
  • 25. 24. What is the name of the organization helping to foster security standards for cloud computing? ◦A. Cloud Security Standards Working ◦B. Cloud Security Alliance ◦C. Cloud Security Watchdog ◦D. Security in the Cloud Alliance ◦ Answer: B
  • 26. 25. Which of the following statements is true regarding the scope of 'request' in JSP? ◦ A. Objects with request scope are accessible from pages processing the same request where they were created ◦ B. All references to the object shall be released after the request is processed; in particular, if the request is forwarded to a resource in the same run time, the object is still reachable ◦ C. References to objects with request scope are stored in the request object ◦ D. All of the above ◦ Answer: D