Chào các bạn! Truyen4U chính thức đã quay trở lại rồi đây!^^. Mong các bạn tiếp tục ủng hộ truy cập tên miền Truyen4U.Com này nhé! Mãi yêu... ♥

WPSJ Threory

1.The implicit object 'out' is equivalent to an instance of ________ class.

JspWriter

2.Which of the following implicit object is not available to use in EL expressions?

contextScope

3.What will be the output of following expression if used in a JSP page? ${7 % 2}

1

4.Which one of the following JSTL tags is used to iterate through a collection of objects?

C. <c:forEach>

5.Which method starts the process of the evaluation of the body inside the tag for the first time?

public void doInitBody()

6.Which one of the following values does the SimpleTag's doTag() method return?

void

7.A ___________ instructs a deployment tool to create specific configuration requirements for deployment of a servlet.

Deployment descriptor

8.Request line and header information are components of _____________.

Request message structure

9.A _________ contains data to be passed between a server and the client.

Servlet response

10.The ________ adds some extra data at the end of the URL to identify the session.

HttpSessionListener class

11.A ______ has a unique value and so it can be utilized to identify the client and track the session.

cookie

12 .The _____________ is implemented to create a filter class.

Filter definition

13.The ______________ contains personal information about the user and introduces the SSL client to the server.

Secure certificate

14.______________ is a portable, platform-independent component model written in Java programming language.

JavaBeans

15._________ is the process of converting objects or primitive data types.

Coercion

16.__________ has standard set of tags used to write and develop JSP pages.

JSTL

17.Which one of the following methods is used to retrieve all the values of the specified header name?

getHeaders(String name)

18.Which of the following methods can be used to write messages to a servlet log file?

log(String msg, Throwable t)

19.Read the following and state the correct answer.

Which of the following elements are allowed to be children of the <filter-mapping> element of the deployment descriptor?

B. <filter-class>

22.Which one of the following methods returns an array of String objects containing all of the parameter values or null if parameters do not exist?

getParameterValues()

23.Which of the following HTTP methods can be used to send large amount of binary data from the browser to a servlet?

doPost()

24.Which one of the following methods of ServletConfig interface retrieves the value of the initialization parameter?

getInitParameter()

25.Which one of the following methods of HttpServletRequest interface indicates whether the authenticated user is included in the logical "role"?

isUserInRole()

26.In a Web application, the Tag Library Descriptors ( TLDs) are stored _________.

in /WEB-INF directory or its sub-directory.

27.The _______ method is used to specify the time for which the servlet container keeps the session alive.

getMaxInactiveInterval()

28.Which element in the deployment descriptor specifies the path to the tag library descriptor file?

taglib-location

29.Which one of the following statements declares the current JSP page to be an error page ?

C. <%@ page %>

30.Which one of the following attributes of a page directive specifies an HTTP response of the type "image/svg"?

contentType

31.Which one of the following authentication techniques requires a browser to use a default TCP port and an extra authentication layer in between HTTP and TCP?

HTTPS Client Authentication

31.Which tag library contains the tags for looping, expression evaluation and basic input and output?

Core Tag Library

32.Following is a series of steps to handle the requirement of custom tags, whenever they require access to the body content

1. A change is brought about in the TLD file by entering a scriptless value in the body context.

2. The setJspBody() method is called by the container. By using getJspBody() method, fragments are

accessed and executed using the invoke() method.

3. Finally, with the help of out.println(), the processed body content is sent to the output stream as a

response.

--2,1,3

33.Which of the following classes or interfaces can be used to retrieve an instance of RequestDispatcher?

ServletContext

HttpServletRequest

34.Which of the following implicit objects are available in a JSP page?

exception

application

35.The ______ element is used to redirect the request object containing the client request from one JSP file to another file.

A. <jsp:forward>

36.The _______ class encapsulates localizable date-time formatting data, such as names of months, days of week and the time zone data.

DateFormatSymbols

37.The _________ method can be used to achieve the same functionality as provided by findAncestorWithClass().

getAncestorWithClass()

38.Assume that you have defined a tag that accepts dynamic attributes. Which one of the following methods is invoked when such a tag is passed an attribute that is not declared in the tag library descriptor file?

setDynamicAttribute()

39.Which one of the following elements can be used to specify that a particular attribute of a custom tag is mandatory?

A. <required>true</</required>

40.The _________ is a program that manages execution of servlets and JSP pages.

Web Container

41.Is the GET method suitable for submitting a form not containing login or other sensitive information?

Yes

42.The ________ adds some extra data at the end of the URL to identify the session.

URL rewriting technique

20.Following are the steps to implement the declarative security. Which of the following indicates the correct sequence of the steps to achieve it?

1. Set up user names, passwords and roles.

2. Tell the server that you are using form-based authentication and designate the locations of the login page and login-failure page.

3. Create a login page.

4. Create a page to report failed login attempts.

5. Specify which URLs should be password protected.

6. Specify which URLs should be available only with SSL.

7. Turn off the invoker servlet.

1, 3, 5, 6, 7, 2, 4

1, 2, 3, 4, 5, 6, 7

3, 4, 1, 2, 5, 6, 7

21.Following are the steps to implement the programmatic security. Which of the following indicates the correct sequence of the steps to achieve it?

1. Check whether there is an authorization request header.

2. Get the string, which contains the encoded user name/password.

3. If authentication fails, send the proper response to the client.

4. Check the username and password.

5. Reverse the base64 encoding of the user name/password string.

1, 2, 5, 4, 3

4, 1, 2, 3, 5

2, 3, 4, 1, 5

Bạn đang đọc truyện trên: Truyen4U.Com

Tags: