SlideShare a Scribd company logo
1 of 27
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

What's hot

Java database connectivity with MySql
Java database connectivity with MySqlJava database connectivity with MySql
Java database connectivity with MySqlDhyey Dattani
 
Resume joseph gregory java
Resume   joseph gregory javaResume   joseph gregory java
Resume joseph gregory javaJoseph Gregory
 
Java DataBase Connectivity API (JDBC API)
Java DataBase Connectivity API (JDBC API)Java DataBase Connectivity API (JDBC API)
Java DataBase Connectivity API (JDBC API)Luzan Baral
 
Arpit Joshi Resume
Arpit Joshi ResumeArpit Joshi Resume
Arpit Joshi ResumeArpit Joshi
 
Session 35 - Design Patterns
Session 35 - Design PatternsSession 35 - Design Patterns
Session 35 - Design PatternsPawanMM
 
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 PatternsPawanMM
 
Session 33 - Session Management using other Techniques
Session 33 - Session Management using other TechniquesSession 33 - Session Management using other Techniques
Session 33 - Session Management using other TechniquesPawanMM
 
Change RelationalDB to GraphDB with OrientDB
Change RelationalDB to GraphDB with OrientDBChange RelationalDB to GraphDB with OrientDB
Change RelationalDB to GraphDB with OrientDBApaichon Punopas
 
Session 25 - Introduction to JEE, Servlets
Session 25 - Introduction to JEE, ServletsSession 25 - Introduction to JEE, Servlets
Session 25 - Introduction to JEE, ServletsPawanMM
 
Session 32 - Session Management using Cookies
Session 32 - Session Management using CookiesSession 32 - Session Management using Cookies
Session 32 - Session Management using CookiesPawanMM
 
Session 29 - Servlets - Part 5
Session 29 - Servlets - Part 5Session 29 - Servlets - Part 5
Session 29 - Servlets - Part 5PawanMM
 
Jsp + My Sql
Jsp + My SqlJsp + My Sql
Jsp + My SqlAshwin K
 

What's hot (15)

Java database connectivity with MySql
Java database connectivity with MySqlJava database connectivity with MySql
Java database connectivity with MySql
 
Resume joseph gregory java
Resume   joseph gregory javaResume   joseph gregory java
Resume joseph gregory java
 
Java DataBase Connectivity API (JDBC API)
Java DataBase Connectivity API (JDBC API)Java DataBase Connectivity API (JDBC API)
Java DataBase Connectivity API (JDBC API)
 
Arpit Joshi Resume
Arpit Joshi ResumeArpit Joshi Resume
Arpit Joshi Resume
 
Qamar
QamarQamar
Qamar
 
3 database-jdbc(1)
3 database-jdbc(1)3 database-jdbc(1)
3 database-jdbc(1)
 
Session 35 - Design Patterns
Session 35 - Design PatternsSession 35 - Design Patterns
Session 35 - Design Patterns
 
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
 
Session 33 - Session Management using other Techniques
Session 33 - Session Management using other TechniquesSession 33 - Session Management using other Techniques
Session 33 - Session Management using other Techniques
 
Change RelationalDB to GraphDB with OrientDB
Change RelationalDB to GraphDB with OrientDBChange RelationalDB to GraphDB with OrientDB
Change RelationalDB to GraphDB with OrientDB
 
Session 25 - Introduction to JEE, Servlets
Session 25 - Introduction to JEE, ServletsSession 25 - Introduction to JEE, Servlets
Session 25 - Introduction to JEE, Servlets
 
Session 32 - Session Management using Cookies
Session 32 - Session Management using CookiesSession 32 - Session Management using Cookies
Session 32 - Session Management using Cookies
 
Session 29 - Servlets - Part 5
Session 29 - Servlets - Part 5Session 29 - Servlets - Part 5
Session 29 - Servlets - Part 5
 
J query
J queryJ query
J query
 
Jsp + My Sql
Jsp + My SqlJsp + My Sql
Jsp + My Sql
 

Similar to JSP MCQ Question with Answer (20)

jdbc
jdbcjdbc
jdbc
 
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
 
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 GoogleASG
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring FrameworkASG
 
Dependency Injection in Spring
Dependency Injection in SpringDependency Injection in Spring
Dependency Injection in SpringASG
 
1. Spring intro IoC
1. Spring intro IoC1. Spring intro IoC
1. Spring intro IoCASG
 
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 competitionASG
 

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

Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 

Recently uploaded (20)

Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 

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