0% found this document useful (0 votes)
26 views6 pages

Jsp-Advanced-Java (Set 1)

Uploaded by

chetandandekara
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views6 pages

Jsp-Advanced-Java (Set 1)

Uploaded by

chetandandekara
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

JSP

chapter in
Advanced JAVA

1 of 3 sets

Chapter: JSP

1. Which one is the correct order of phases in JSP life cycle?


A. Initialization, Cleanup, Compilation, Execution
B. Initialization, Compilation, Cleanup, Execution
C. Compilation, Initialization, Execution, Cleanup
D. Cleanup, Compilation, Initialization, Execution
o m
Answer:C
. c
te
a
2. Which technology do we mix our business logic with the presentation logic?
A. Servlet
q M
B. JSP
c
C. Both A and B
D. None of the above
M
Answer:A

3. 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

4. The ASP and JSP technologies are quite similar in the way they support the
creation of Dynamic pages, using HTML templates, scripting code and components
for business logic.
A. True
B. False
C. none
D. all
Answer:A

5. Which of the following is an advantage of the statement – Separation of business


logic from JSP ?
A. Custom Tags in JSP
B. JSP Standard Tag Library
C. All the above
D. None of the above
Answer:A

6. JSPs eventually are compiled into Java servlets, you can do as much with JSPs
as you can do with Java servlets.
A. True
B. False
C. none
D. all
Answer:A

7. JavaServer Pages often serve the same purpose as programs implemented using
the Common Gateway Interface (CGI)
A. True
B. False
C. none
D. all
Answer:A

8. Which is the Microsoft solution for providing dynamic Web content?


A. ASP
B. JSP
C. Both A and B
D. None of the above
Answer:A

View all MCQ's at McqMate.com


9. 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
Answer:B

10. A JSP page consists of which tags?


A. HTML tags
B. JSP tags
C. Both A & B
D. None of the above
Answer:C

11. Which packages does a JSP API consist of?


A. javax.servlet.jsp
B. java.servlet
C. javax.servlet.jsp.tagext
D. Both A & C
Answer:D

12. 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

13. The difference between Servlets and JSP is the …………….


A. translation
B. compilation
C. syntax
D. Both A and B
Answer:C

View all MCQ's at McqMate.com


14. 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

15. JSP includes a mechanism for defining …………………………. or custom tags.


A. static attributes
B. local attributes
C. dynamic attributes
D. global attributes
Answer:C

16. 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

17. Which is not a directive?


A. include
B. page
C. export
D. taglib
Answer:C

18. Which http method send by browser that asks the server to get the page only?
A. get
B. option
C. put
D. post
Answer:A

View all MCQ's at McqMate.com


19. Which tag should be used to pass information from JSP to included JSP?
A. Using <%jsp:page> tag
B. Using <%jsp:param> tag
C. Using <%jsp:import> tag
D. Using <%jsp:useBean> tag
Answer:B

20. _jspService() method of HttpJspPage class should not be overridden.


A. True
B. False
C. none
D. all
Answer:A

21. Which is not a directive?


A. include
B. page
C. export
D. useBean
Answer:C

22. Attribute used to handle web flow requests.


A. servlet-mapping
B. servlet-attr
C. servlet-flow
D. servlet-requests
Answer:A

23. To resolve Facelets views we configure:


A. ViewFacelets
B. ViewResolver
C. View-resolver
D. View_Resolver
Answer:B

View all MCQ's at McqMate.com


24. File extension of a view state’s name which is by default loaded by facelet page.
A. .xml
B. .hbm.xml
C. .xhtml
D. none of the mentioned
Answer:C

25. Navigation in traditional JSF applications is handled by:


A. linking directly linking to a resource
B. commandLink
C. invoking an action
D. all of the mentioned
Answer:D

26. For cross field validation or some sort of barrier to ensure state before you
start a flow, we use.
A. FacesContext
B. FaceletContext
C. FacesResolver
D. All of the mentioned
Answer:A

27. Component which additionally provides a pop-up date picker control for its
enclosed input field.
A. clientDateValidator
B. clientValidator
C. dateValidator
D. validator
Answer:A

28. Component which encloses command button.


A. validateAll
B. validateAllClick
C. validateAllInClick
D. validateAllOnClick
Answer:C

View all MCQ's at McqMate.com

You might also like