Cyber Monday Sale Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: xmas50

GIAC GSSP-Java - GIAC Secure Software Programmer – Java

Page: 4 / 9
Total 275 questions

Which of the following syntaxes is used to run the application packaged as a JAR file?

A.

javac jar app.jar

B.

javac -jar app.jar

C.

java -jar app.jar

D.

java jar application.jar

Which of the following options directs the Java compiler to search files in the current directory?

A.

dir

B.

; (i.e. a semi colon)

C.

-d

D.

current

E.

. (i.e. a dot)

Which of the following is a mandatory sub-element of the element of the deployment descriptor?

A.

B.

C.

D.

You work as a programmer for PassGuide.Inc. You have a session object named session1 with an attribute named Attribute1, and an HttpSessionBindingEvent object binding1 bound to session1.

Which of the following will be used to retrieve Attribute1?

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

A.

Object obj=binding1.getSession().getAttribute("Attribute1");

B.

Object obj=binding1.getAttribute("Attribute1");

C.

Long MyAttribute=session1.getAttribute("Attribute1");

D.

String str1=session1.getAttribute("Attribute1");

E.

Object obj=session1.getAttribute("Attribute1");

Which of the following statements about a JAR file are true?

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

A.

It cannot be accessed through a class path, nor they can be used by java and javac.

B.

It is used to compress and archive data.

C.

It can be moved from one computer to another.

D.

It is created by using the jar command.

Which of the following TextField constraints hides the input while a user is entering the data in the text box?

A.

ANY

B.

NUMERIC

C.

PASSWORD

D.

CONSTRAINT_MASK

Which of the following methods of the HttpServletResponse interface is used for URL rewriting?

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

A.

encodeURL

B.

encodeRedirectURL

C.

sendRedirect

D.

getRequestURL()

Which of the following attributes of the action is used to indicate whether to force the output buffer used by the JspWriter to be written to the client before the resource is included?

A.

value

B.

flush

C.

name

D.

page

You work as a developer for PassGuide Inc. You have implemented a session bean with a method doPrint(), which behaves differently depending on the caller's security role. Only MANAGER in the security roles "ADMIN" and "MANAGER" are allowed to call the method. Which of the following actions are appropriate to accomplish if there is no security-related metadata in the deployment descriptor?

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

A.

Annotate method doPrint() with @RolesAllowed({"ADMIN","MANAGER"}).

B.

Annotate method doPrint() with @PermitAll.

C.

If EJBContext.isCallerInRole("ADMIN") returns true, implement the behavior defined for MANAGER in role "ADMIN".

D.

If EJBContext.getCallerPrincipal returns role "ADMIN", implement the behavior for MANAGER in role ADMIN.

Which of the following statements are true?

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

A.

StringBuffer is thread safe, but StringBuilder is not.

B.

The String class is final.

C.

StringBuilder offers faster performance than StringBuffer.

D.

The size of the String can be obtained using the length property.