Academic Tutorials

English | French | Portugese | Dutch | Italian

em linha

Home Códigos de fonte E-Livros Downloads Contatar-nos Sobre nós

HTML Tutorials
HTML Tutorial
XHTML Tutorial
CSS Tutorial
TCP/IP Tutorial
CSS 1.0
CSS 2.0
XML Tutorials
XML Tutorial
XSL Tutorial
XSLT Tutorial
DTD Tutorial
Schema Tutorial
XForms Tutorial
XSL-FO Tutorial
XML DOM Tutorial
XLink Tutorial
XQuery Tutorial
XPath Tutorial
XPointer Tutorial
RDF Tutorial
SOAP Tutorial
WSDL Tutorial
RSS Tutorial
WAP Tutorial
Web Services Tutorial
Browser Scripting
JavaScript Tutorial
VBScript Tutorial
DHTML Tutorial
HTML DOM Tutorial
WMLScript Tutorial
E4X Tutorial
Server Scripting
ASP Tutorial
PERL Tutorial
SQL Tutorial
ADO Tutorial
Apple Script
PL/SQL Tutorial
SQL Server
.NET (dotnet)
.Net Mobile
C# : C Sharp
SVG Tutorial
Flash Tutorial
Media Tutorial
SMIL Tutorial
Photoshop Tutorial
Gimp Tutorial
Gnuplot Programming
GIF Animation Tutorial
Scientific Visualization Tutorial
Web Building
Web Browsers
Web Hosting
W3C Tutorial
Web Building
Web Quality
Web Semantic
Web Careers
Weblogic Tutorial
Web Site Hosting
Domain Name
Java Tutorials
Java Tutorial
JSP Tutorial
Servlets Tutorial
Struts Tutorial
EJB Tutorial
JMS Tutorial
JMX Tutorial
Programming Langauges
C Tutorial
C++ Tutorial
Visual Basic Tutorial
Data Structures Using C
Assembly Language
Forth Programming
Lisp Programming
Data Warehousing
CGI Programming
Emacs Tutorial
Soft Skills
Communication Skills
Time Management
Project Management
Team Work
Leadership Skills
Corporate Communication
Negotiation Skills
Database Tutorials
Operating System
Software Testing
SAP Module
Business Warehousing
SAP Basis
Material Management
Sales & Distribution
Human Resource
Customer Relationship Management
Production and Planning
Networking Programming
Corba Tutorial
Networking Tutorial
Microsoft Office
Microsoft Word
Microsoft Outlook
Microsoft PowerPoint
Microsoft Publisher
Microsoft Excel
Microsoft Front Page
Microsoft InfoPath
Microsoft Access
Financial Accounting
Managerial Accounting

Quiz for JSP Tutorial

1. Choose the statement that best describes the relationship between JSP and servlets:

Servlets are built on JSP semantics and all servlets are compiled to JSP pages for runtime usage.
JSP and servlets are unrelated technologies.
Servlets and JSP are competing technologies for handling web requests. Servlets are being superseded by JSP, which is preferred. The two technologies are not useful in combination.
JSPs are built on servlet semantics and all JSPs are compiled to servlets for runtime usage.

2. What is a benefit of using JavaBeans to separate business logic from presentation markup within the JSP environment ?

It allows the JSP to access middleware.
It provides a dynamic markup environment, such that JavaBeans are integrated seamlessly with the template presentation content, in order to create the dynamic display for the client.
It provides the developer with full access to the Java 2 Platform Enterprise Edition (J2EE), which is unavailable from outside the JavaBean environment.
None of these

3. Why use RequestDispatcher to forward a request to another resource, instead of using a sendRedirect ?

Redirects are no longer supported in the current servlet API.
Redirects are not a cross-platform portable mechanism.
The RequestDispatcher does not use the reflection API.
The RequestDispatcher does not require a round trip to the client, and thus is more efficient and allows the server to maintain request state.

4. What alternatives exist to embedding Java code directly within the HTML markup of your JSP page ?

Moving the code into your session manager.
Moving the code into scriptlets.
Moving the code into JavaBeans and servlets.
Moving the code into a transaction manager.

5. What type of scriptlet code is better-suited to being factored forward into a servlet ?

Code that deals with logic that is common across requests.
Code that deals with logic that is vendor specific.
Code that deals with logic that relates to database access.
Code that deals with logic that relates to client scope.

6. Choose the statement that best describes how to connect JSP pages and Enterprise JavaBeans (EJBs):

Lookup the EJBs from within a JSP, but use the EJBs from within a basic JavaBean.
Lookup and use the EJBs from a separate business delegate. The JavaBeans that work with JSP pages are clients to these business delegates and know nothing about EJB specifics.
Lookup the EJBs from within a servlet, delegating usage to specific JSP pages.
Lookup and use the EJBs from within a JSP page, but only as remote references.

7. Are custom tags available in JSP 1.0? If not, how else might you implement iteration from within a JSP ?

Yes, but the only tags available relate to database access.
Yes, but custom tags will not help developers create tags for use in iterating over a collection.
No. To iterate over a collection of values, one must use scriptlet code.
No, but there is a standard tag that may be used.

8. What is the initial contact point for handling a web request in a Page-Centric architecture ?

A JSP page.
A JavaBean.
A servlet.
A session manager.

9. What is the difference between doing an include or a forward with a RequestDispatcher ?

The two methods provide the same functionality, but with different levels of persistence.
The forward method is deprecated as of JSP 1.1 and the include method should be used in order to substitute portions of a dynamic display at runtime.
The include method transfers control to a dynamic resource, while the forward method allows for dynamic substitution of another JPS pages output, returning control to the calling resource.
The forward method transfers control to the designated resource, while the include method invokes the designated resource, substitutes its output dynamically in the display, and returns control to the calling page.

10. Which of the following can the JSP include action include output from ?

Another JSP
Plain text file
All of the above

11. The <jsp:include/< action can pass parameters to the page which it is including. How does this second page obtain the

value of these parameters ?
Using the <jsp:readParam/> action
Using the <jsp:getParam/> action
Use the request.getParameter() method

12. What is wrong with the following code ?
<jsp:forward page="Welcome.jsp" flush="true"/>

Unmatched bracket in for statement
Flush attribute must be false
Keyword 'file' should be used instead of 'page' in the <jsp:forward/> action
Actions cannot be used within scriptlet blocks

13. What is wrong with the following code ?
<jsp:include page="MainMenu.jsp" flush="true"/>
Cookie c = new Cookie("UserName", "Alastair Gulland");

Cookie class can not take parameters in it's constructor
The request object is used for creating cookies
Although no error will be reported the use of the <jsp:include/> action means that the response object can't be used to create cookies.
The <jsp:include/> action must be placed inside the script block

14. When a JSP page is compiled, what is it turned into ?


15. Which of the following is not a standard method called as part of the JSP life cycle ?


16. If you want to override a JSP file's initialization method, within what type of tags must you declare the method ?

<@ @>
<%@ %>
<% %>
<%! %>

17. Which of the following can not be used as the scope when using a JavaBean with JSP ?


18. What is the key difference between using a <jsp:forward> and HttpServletResponse.sendRedirect()?

forward executes on the server while sendRedirect() executes on the client.
forward executes on the client while sendRedirect() executes on the server.
The two methods perform identically.
None of these

19. How can a servlet call a JSP error page?

This capability is not supported.
When the servlet throws the exception, it will automatically be caught by the calling JSP page.
The servlet needs to forward the request to the specific error page URL. The exception is passed along as an attribute named "javax.servlet.jsp.jspException".
The servlet needs to redirect the response to the specific error page, saving the exception off in a cookie.

20. What is JSP ?

Java Server Pages
Java Special Pages
Java Static Pages
Java Showing Pages

Keywords: Quiz, personality quiz, quizzes, quiz questions, character quiz, knowledge quiz, personality test, personality quizzes, quiz are you, quiz questions and answers.

HTML Quizes
CSS Quiz
CSS 1.0 Quiz
CSS 2.0 Quiz
XML Quizes
XML Quiz
XSL Quiz
DTD Quiz
Schema Quiz
XForms Quiz
XLink Quiz
XQuery Quiz
XPath Quiz
XPointer Quiz
RDF Quiz
RSS Quiz
WAP Quiz
Web Services Quiz
Browser Scripting Quizes
JavaScript Quiz
VBScript Quiz
WMLScript Quiz
E4X Quiz
Server Scripting Quizes
ASP Quiz
SQL Quiz
ADO Quiz
CVS Quiz
Python Quiz
Apple Script Quiz
SQL Server Quiz
PHP Quiz
.NET (dotnet) Quizes
Microsoft.Net Quiz
ASP.Net Quiz
.Net Mobile Quiz
C# : C Sharp Quiz
VC++ Quiz
Multimedia Quizes
SVG Quiz
Flash Quiz
Media Quiz
Photoshop Quiz
Gimp Quiz
Matlab Quiz
Gnuplot Programming Quiz
GIF Animation Quiz
Scientific Visualization Quiz
Graphics Quiz
Web Building  Quizes
Web Browsers Quiz
Web Hosting Quiz
W3C Quiz
Web Building Quiz
Web Quality Quiz
Web Semantic Quiz
Web Careers Quiz
Weblogic Quiz
SEO Quiz
Web Site Hosting Quiz
Domain Name Quiz
Java Quizes
Java Quiz
JSP Quiz
Servlets Quiz
Struts Quiz
EJB Quiz
JMS Quiz
JMX Quiz
Eclipse Quiz
J2ME Quiz
Programming Langauges Quizes
C Quiz
C++ Quiz
Visual Basic Quiz
Data Structures Using C Quiz
Cobol Quiz
Assembly Language Quiz
Mainframe Quiz
Forth Programming Quiz
Lisp Programming Quiz
Pascal Quiz
Delphi Quiz
Fortran Quiz
OOPs Quiz
Data Warehousing Quiz
CGI Programming Quiz
Emacs Quiz
Gnome Quiz
ILU Quiz
Soft Skills Quizes
Communication Skills Quiz
Time Management Quiz
Project Management Quiz
Team Work Quiz
Leadership Skills Quiz
Corporate Communication Quiz
Negotiation Skills Quiz
Database Quizes
Oracle Quiz
MySQL Quiz
Operating System Quizes
BSD Quiz
Symbian Quiz
Unix Quiz
Internet Quiz
IP-Masquerading Quiz
IPC Quiz
Software Testing Quizes
Testing Quiz
Firewalls Quiz
SAP Module Quizes
ERP Quiz
Business Warehousing Quiz
SAP Basis Quiz
Material Management Quiz
Sales & Distribution Quiz
Human Resource Quiz
Netweaver Quiz
Customer Relationship Management Quiz
Production and Planning Quiz
Networking Programming Quizes
Corba Quiz
Networking Quiz
Microsoft Office Quizes
Microsoft Word Quiz
Microsoft Outlook Quiz
Microsoft PowerPoint Quiz
Microsoft Publisher Quiz
Microsoft Excel Quiz
Microsoft Front Page Quiz
Microsoft InfoPath Quiz
Microsoft Access Quiz
Accounting Quizes
Financial Accounting Quiz
Managerial Accounting Quiz

Privacy Policy
Copyright © 2003-2024 Vyom Technosoft Pvt. Ltd., All Rights Reserved.