Winter Sale Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: ecus65

GIAC GSSP-Java - GIAC Secure Software Programmer – Java

Page: 7 / 9
Total 275 questions

Which of the following declarations are the valid declaration for the element?

Each correct answer represents a complete solution. Choose all that apply.

A.

AccountServlet

/acme/Account

GET

PUT

Accountant

B.

AssistantServlet

/*

GET

PUT

Assistant

C.

AccountServlet

/acme/Account

Accountant

D.

Assistant

E.

AssistantServlet

/*

Assistant

GET

PUT

Mark works as a Programmer for InfoTech Inc. He creates an error page named

PageDoesNotExist.jsp. He wants to ensure that the PageDoesNotExist.jsp page will always be displayed if the server cannot find the requested page or if the request is for a page that does not exist on the server. Which of the following error-page code declarations will be used?

A.

406

PageDoesNotExist.jsp

B.

405

PageDoesNotExist.jsp

C.

404

PageDoesNotExist.jsp

D.

503

PageDoesNotExist.jsp

You have the following code of a PreparedStatement.

PreparedStatement stm = con.prepareStatement("UPDATE EMPLOYEES SET SALARY = ? WHERE ID = ?");

Which of the following statements are true about a PreparedStatement?

Each correct answer represents a complete solution. Choose all that apply.

A.

The executeUpdate() method executes the SQL query in the PreparedStatement object and returns the ResultSet object generated by the query.

B.

A PreparedStatement reduces execution time if it is required to execute the SQL statementmultiple times.

C.

When the executeQuery() method is used to execute a DDL statement, such as in creating a table, it returns the int 0.

D.

It is illegal for an instance of a PreparedStatement to contain a SQL statement that has already been compiled.

You work as a Software Developer for UcTech Inc. You want the deployment descriptor to contain entries for the authentication type and the security realm. In order to accomplish this, you have to use the sub-elements of the element. Which of the following will you use?

Each correct answer represents a complete solution. Choose all that apply.

A.

B.

C.

D.

E.

F.

G.

The java.util.logging package provides the classes and interfaces of the Java platform's core logging facilities. Which of the following are the main target uses of logs?

Each correct answer represents a complete solution. Choose all that apply.

A.

Problem diagnosis by field service engineers

B.

Problem diagnosis by the development organization

C.

Problem diagnosis by end users and system administrators

D.

Problem diagnosis by developers

Which of the following circumstances can prevent the execution of code in a finally block?

Each correct answer represents a complete solution. Choose two.

A.

An exception arising in the try block that precedes the finally block.

B.

An exception arising in the finally block itself.

C.

No exception condition arising in the try block that precedes the finally block.

D.

The use of the System.exit(0); statement in the finally block.

Which of the following are the advantages of JAR files over TAR files?

Each correct answer represents a complete solution. Choose all that apply.

A.

It cannot be digitally signed.

B.

It provides package sealing.

C.

It can be compressed.

D.

It provides package versioning.

Mark works as a Programmer for InfoTech Inc. He develops the following code snippet.

import java.util.*;

public class DemoSet{

public static void main(String[] args){

TreeSet ts = new TreeSet();

ts.add("Sunday");

ts.add("Friday");

ts.add("Wednesday");

ts.add("Sunday");

ts.add("Monday");

Iterator it = ts.iterator();

while(it.hasNext()){

System.out.print(it.next() + " ");

}

}

}

What will be the output when he tries to execute the given code snippet?

A.

Wednesday Sunday Monday Friday

B.

An exception will be thrown at runtime.

C.

Friday Monday Sunday Wednesday

D.

Sunday Monday Wednesday Friday

Mark works as a Programmer for InfoTech Inc. He develops the following code snippet.

package Mark.tutorial.javaee.ejb;

import java.util.logging.Logger;

import javax.annotation.Resource;

import javax.ejb.Stateless;

import javax.ejb.Timeout;

import javax.ejb.Timer;

import javax.ejb.TimerService;

@Stateless

public class TimerBean implements TimerSessionBean {

@Resource

TimerService timerService;

private static final Logger logger = Logger.getLogger

("com.sun.tutorial.javaee.ejb.timersession.TimerSessionBean");

public void createTimer(long intervalDuration) {

Timer timer = timerService.createTimer(intervalDuration, "New timer created");

}

@Timeout

public void timeout(Timer timer) {

logger.info("Timer Timeout");

}

}

which of the following statements are true about the code?

Each correct answer represents a complete solution. Choose all that apply.

A.

The class Logger cannot be used with a stateless session bean.

B.

The EJB container will invoke the timeout method of TimerSessionBean when the timer expires.

C.

The class is using the createTimer method incorrectly because it creates a new timer.

D.

TimerBean is a stateless session bean that shows how to set a timer.

A security manager is an object that defines a security policy for an application. Which of the following is used by security managers to indicate security domains?

A.

Deployer

B.

Container provider

C.

Class loader

D.

Bean provider