A developer has used this code within a servlet: 62.if(reque

题目
单选题
A developer has used this code within a servlet: 62.if(request.isUserInRole("vip")) { 63.// VIP-related logic here 64.} What else must the developer do to ensure that the intended security goal is achieved?()
A

Create a user called vip in the security realm

B

Define a group within the security realm and call it vip

C

Define a security-role named vip in the deployment descriptor

D

Declare a security-role-ref for vip in the deployment descripto

如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

What is the new feature within 8.5.1 that allows a developer to remove malicious code from HTML?()

  • A、Java Server Faces (JSF)
  • B、Representational State Transfer (REST)
  • C、Active Content Filtering (ACF)
  • D、Notes Application Scrubber

正确答案:C

第2题:

The Squeaky Bean company has decided to port their web application to a new J2EE 1.4 container. Whilereviewing the application, a developer realizes that in multiple places within the current application, nearlyduplicate code exists that finds enterprise beans. Which pattern should be used to eliminate this duplicatecode?()

  • A、Transfer Object
  • B、Front Controller
  • C、Service Locator
  • D、Intercepting Filter
  • E、Business Delegate
  • F、Model-View-Controller

正确答案:C

第3题:

A system has a TCPIP issue that is a known problem. The newest code from the support website has been downloaded to resolve the issue. Which of the following commands should be used to install the new code?()

A.smitty install_commit

B.installp -ugV

C.installp -aX

D.instfix -all


参考答案:C

第4题:

You work as an application developer at Certkiller .com. Certkiller .com has instructed you to create a class named MetricFormula. This class will be used to compare MetricUnit and EnglishUnit objects.The MetricFormula is currently defined as follows (Line numbers are used for reference purposes only): 1. public class MetricFormula2. { 3. 4. } You need to ensure that the MetricFormula class can be used to compare the required objects. What should you do? ()

  • A、 Add the following code on line 1: : IComparable {
  • B、 Add the following code on line 1: : IComparer {
  • C、 Add the following code on line 3: public int Compare (object x, object y) {// implementation code }
  • D、 Add the following code on line 3: public int CompareTo (object obj) {// implementation code }

正确答案:B,C

第5题:

A developer has created a special servlet that is responsible for generating XML content that is sent to adata warehousing subsystem. This subsystem uses HTTP to request these large data files, which are compressed by the servlet to save internal network bandwidth. The developer has received a request frommanagement to create several more of these data warehousing servlets. The developer is about to copyand paste the compression code into each new servlet. Which design pattern can consolidate thiscompression code to be used by all of the data warehousing servlets?()

  • A、Facade
  • B、View Helper
  • C、Transfer Object
  • D、Intercepting Filter
  • E、Composite Facade

正确答案:D

第6题:

A developer used wsimport to generate the skeleton code for a Web service implementation. What is the purpose of the generated ObjectFactory class?() 

  • A、 The ObjectFactory class is the generated Service Endpoint Interface class
  • B、 The ObjectFactory class is the generated service provider class that is used by the JAX-WS client.
  • C、 The ObjectFactory class takes the targetNamespace value and creates the directory structure.
  • D、 The ObjectFactory class allows you to programatically construct new instances of the Java representation for XML content.

正确答案:D

第7题:

For which three events can web application event listeners be registered?()

  • A、When a session is created
  • B、After a servlet is destroyed
  • C、When a session has timed out
  • D、When a cookie has been created
  • E、When a servlet has forwarded a request
  • F、When a session attribute value is changed

正确答案:A,C,F

第8题:

Which two prevent a servlet from handling requests.?()

  • A、 The servlet’s init method returns a non-zero status.
  • B、 The servlet’s init method throws a Servlet Exception
  • C、 The servlet’s init method sets the Servlet Response’s context length to 0
  • D、 The servlet’s init method sets the Servlet Response’s content type to null.
  • E、 The servlet’s init method does NOT return within a time period defined by the servlet container.

正确答案:B,E

第9题:

Given the HttpServlet code:   getServletContext().setAttribute(“foo”, “value”); What is the result?()

  • A、 The attribute foo is placed in the application
  • B、 A ServletContextListener registered for that servlet is notified
  • C、 A ServletAttributeListener registered for that servlet is notified
  • D、 An HttpSessionAttributeListener registered for that servlet is notified

正确答案:A

第10题:

You work as the application developer at Certkiller .com. Certkiller .com uses Visual Studio.NET 2005 as its application development platform. You are developing a .NET Framework 2.0 Windows Service application and are busy writing the following installation code for the Windows service: Public Class TestServiceInstaller Implemets Installer 'Additional code to go here End Class You are required to install the Windows service and write the values associated with the service in the Windows Registry. What should you do?()

  • A、The Assembly Registration Tool (Regasm.exe) should be used.
  • B、The Global Assembly Cache Tool (Gacutil.exe) should be used.
  • C、The .NET Services Installation Tool (Regsvcs.exe) should be used.
  • D、The Installer Tool (InstallUtil.exe) should be used.

正确答案:D

更多相关问题