Deck 3: Servlets and JSPS

ملء الشاشة (f)
exit full mode
سؤال
Which of the following is true about servlets?

A)Servlets execute within the address space of web server
B)Servlets are platform-independent because they are written in java
C)Servlets can use the full functionality of the Java class libraries
D)Servlets execute within the address space of web server, platform independent and uses the functionality of java class libraries
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
Which method is used to specify before any lines that uses the PrintWriter?

A)setPageType()
B)setContextType()
C)setContentType()
D)setResponseType()
سؤال
Which of the following are the session tracking techniques?

A)URL rewriting, using session object, using response object, using hidden fields
B)URL rewriting, using session object, using cookies, using hidden fields
C)URL rewriting, using servlet object, using response object, using cookies
D)URL rewriting, using request object, using response object, using session object
سؤال
The getSession() method with „true? as its parameter [ getSession(true) ] it will return the appropriate session object when

A)the session is completed
B)the session object is passed to another method
C)the session does not exists
D)the session is existing
سؤال
A servlet maintain session in

A)Servlet container
B)Servlet context
C)Servlet request heap
D)Servlet response heap
سؤال
Servlet mapping defines

A)an association between a URL pattern and a servlet
B)an association between a URL pattern and a request page
C)an association between a URL pattern and a response page
D)All of the above
سؤال
The life cycle of a servlet is managed by

A)servlet context
B)servlet container
C)the supporting protocol (such as http or https)
D)all of the above
سؤال
The init parameter name and value pairs that are defined in web.xml file are handled by

A)ServletConfig object
B)ServletContext object
C)ServletRequest object
D)ServletResponse object
سؤال
How many ServletContext objects are available for an entire web application?

A)One each per servlet
B)One each per request
C)One each per response
D)Only one
سؤال
Which of the following package contains servlet classes?

A)javax.servlet
B)javax.servlet.http
C)Both of the above
D)None of the above
سؤال
Which page directive should be used in JSP to generate a PDF page?

A)contentType
B)generatePdf
C)typePDF
D)contentPDF
سؤال
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
سؤال
Application is instance of which class?

A)javax.servlet.Application
B)javax.servlet.HttpContext
C)javax.servlet.Context
D)javax.servlet.ServletContext
سؤال
_jspService() method of HttpJspPage class should not be overridden.

A)True
B)False
C)none
D)all
سؤال
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
سؤال
Default value of autoFlush attribute is?

A)true
B)false
C)none
D)all
سؤال
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
سؤال
"request" is instance of which one of the following classes?

A)Request
B)HttpRequest
C)HttpServletRequest
D)ServletRequest
سؤال
Which is not a directive?

A)include
B)page
C)export
D)useBean
سؤال
Which is mandatory in tag?

A)id, class
B)id, type
C)type, property
D)type,id
سؤال
Which one of the following is correct for directive in JSP?

A)<%@directive%>
B)<%!directive%>
C)<%directive%>
D)<%=directive%>
سؤال
Which of the following action variable is used to include a file in JSP?

A)jsp:setProperty
B)jsp:getProperty
C)jsp:include
D)jsp:plugin
سؤال
Which attribute uniquely identification element?

A)ID
B)Class
C)Name
D)Scope
سؤال
"out" is implicit object of which class?

A)javax.servlet.jsp.PrintWriter
B)javax.servlet.jsp.SessionWriter
C)javax.servlet.jsp.SessionPrinter
D)javax.servlet.jsp.JspWriter
سؤال
Which object stores references to the request and response objects?

A)sessionContext
B)pageContext
C)HttpSession
D)sessionAttribute
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/25
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 3: Servlets and JSPS
1
Which of the following is true about servlets?

A)Servlets execute within the address space of web server
B)Servlets are platform-independent because they are written in java
C)Servlets can use the full functionality of the Java class libraries
D)Servlets execute within the address space of web server, platform independent and uses the functionality of java class libraries
Servlets execute within the address space of web server, platform independent and uses the functionality of java class libraries
2
Which method is used to specify before any lines that uses the PrintWriter?

A)setPageType()
B)setContextType()
C)setContentType()
D)setResponseType()
setContentType()
3
Which of the following are the session tracking techniques?

A)URL rewriting, using session object, using response object, using hidden fields
B)URL rewriting, using session object, using cookies, using hidden fields
C)URL rewriting, using servlet object, using response object, using cookies
D)URL rewriting, using request object, using response object, using session object
URL rewriting, using session object, using cookies, using hidden fields
4
The getSession() method with „true? as its parameter [ getSession(true) ] it will return the appropriate session object when

A)the session is completed
B)the session object is passed to another method
C)the session does not exists
D)the session is existing
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
5
A servlet maintain session in

A)Servlet container
B)Servlet context
C)Servlet request heap
D)Servlet response heap
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
6
Servlet mapping defines

A)an association between a URL pattern and a servlet
B)an association between a URL pattern and a request page
C)an association between a URL pattern and a response page
D)All of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
7
The life cycle of a servlet is managed by

A)servlet context
B)servlet container
C)the supporting protocol (such as http or https)
D)all of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
8
The init parameter name and value pairs that are defined in web.xml file are handled by

A)ServletConfig object
B)ServletContext object
C)ServletRequest object
D)ServletResponse object
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
9
How many ServletContext objects are available for an entire web application?

A)One each per servlet
B)One each per request
C)One each per response
D)Only one
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
10
Which of the following package contains servlet classes?

A)javax.servlet
B)javax.servlet.http
C)Both of the above
D)None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
11
Which page directive should be used in JSP to generate a PDF page?

A)contentType
B)generatePdf
C)typePDF
D)contentPDF
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
12
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
13
Application is instance of which class?

A)javax.servlet.Application
B)javax.servlet.HttpContext
C)javax.servlet.Context
D)javax.servlet.ServletContext
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
14
_jspService() method of HttpJspPage class should not be overridden.

A)True
B)False
C)none
D)all
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
15
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
16
Default value of autoFlush attribute is?

A)true
B)false
C)none
D)all
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
17
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
18
"request" is instance of which one of the following classes?

A)Request
B)HttpRequest
C)HttpServletRequest
D)ServletRequest
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
19
Which is not a directive?

A)include
B)page
C)export
D)useBean
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
20
Which is mandatory in tag?

A)id, class
B)id, type
C)type, property
D)type,id
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
21
Which one of the following is correct for directive in JSP?

A)<%@directive%>
B)<%!directive%>
C)<%directive%>
D)<%=directive%>
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
22
Which of the following action variable is used to include a file in JSP?

A)jsp:setProperty
B)jsp:getProperty
C)jsp:include
D)jsp:plugin
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
23
Which attribute uniquely identification element?

A)ID
B)Class
C)Name
D)Scope
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
24
"out" is implicit object of which class?

A)javax.servlet.jsp.PrintWriter
B)javax.servlet.jsp.SessionWriter
C)javax.servlet.jsp.SessionPrinter
D)javax.servlet.jsp.JspWriter
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
25
Which object stores references to the request and response objects?

A)sessionContext
B)pageContext
C)HttpSession
D)sessionAttribute
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.