Summer Special 60% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: bestdeal

Free GIAC GSSP-Java Practice Exam with Questions & Answers | Set: 7

Questions 61

Mark works as a Programmer for InfoTech Inc. He develops a session bean class named

accountService. Which of the following rules must be conformed by the session bean class?

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

Options:
A.

It can be used without the @Stateful or @Stateless annotation.

B.

It must implement the business methods defined in the business interface.

C.

It can implement any optional business method annotated by the @Remove annotation.

D.

It must have a public constructor that takes a string as its parameter.

E.

It requires helper classes to meet the needs of an application.

GIAC GSSP-Java Premium Access
Questions 62

You work as a Programmer for InfoTech Inc. You develop two html pages named authenticate.jsp and error.jsp, which are deployed directly at the root of the Web application named Authentication. Which of the following deployment descriptor code declarations will be used to ensure that the error.jsp page will be displayed automatically if the client is not authenticated?

Options:
A.

<auth-method>FORM</auth-method>

<form-login-config>

<form-login-page>/authenticate.jsp</form-login-page>

<form-error-page>/error.jsp</form-error-page>

</form-login-config>

B.

<auth-method>FORM</auth-method>

/authenticate.jsp

<form-error-page>/error.jsp</form-error-page>

C.

<auth-constraint>

<auth-method>FORM</auth-method>

/authenticate.jsp

<form-error-page>/error.jsp</form-error-page>

</auth-constraint>

D.

<auth-method>FORM</auth-method>

<form-login-page>/authenticate.jsp</form-login-page>

/error.jsp

Questions 63

You work as a Software Developer for Relix Inc. You have written the following code. class Test {protected void show(){}}

Now you want to override the method show() in the subclass of Test. Which of the following access

specifiers can you use to override this method?

Each correct answer represents a complete solution. Choose two.

Options:
A.

protected

B.

default (no access specifier)

C.

private

D.

public

Questions 64

Which of the following are advantages of client-side JavaScript?

Each correct answer represents a complete solution. Choose two.

Options:
A.

It is fast.

B.

It provides graphical components.

C.

It is secure.

D.

It provides form-validation at client side.

Questions 65

Which of the following rules must be followed while determining a class loader?

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

Options:
A.

A new instance of the AppletClassLoader is used while loading the first class of an applet.

B.

If the request to load a class is triggered by a reference to it from an existing class, the class loader for the existing class is asked to load the class.

C.

A new instance of the URLClassLoader is used while loading the first class of an application.

D.

The primordial class loader is used if java.lang.Class.ForName is directly called.

Questions 66

Mark works as an Application Developer for XYZ Solutions Inc. He writes the following code.

public class TestDemo{public static void main(String[] args){

{try{int x =0;int d= 5/x;}catch(Exception ex){System.out.println("Exception");}

catch(ArithmeticException ae){System.out.println("Arithmetic Exception");}}}

What is the result when Mark tries to compile and execute the code?

Options:
A.

Exception

B.

An exception is thrown at runtime.

C.

Compilation fails.

D.

Arithmetic Exception

Questions 67

Which of the following statements about the <auth-constraint> element are true?

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

Options:
A.

It is an optional sub-element of the element.

B.

It has and as its sub-elements.

C.

If the <auth-constraint> element is not present, all users can access the resource.

D.

If the <auth-constraint> element has no sub-element, all users can access the resource.

Questions 68

Mark works as a Programmer for InfoTech Inc. He develops a class named Data that imports all the required packages. The class Data uses a method named PrintData(), which uses a method that checks whether the caller has a BeanUser security role. Which of the following code of the method PrintData() will satisfy the requirement?

Options:
A.

public void PrintData()

{

@DeclareRoles("BeanUser")

@Resource SessionContext ctx;

@RolesAllowed("BeanUser")

Principal caller = ctx.getCallerPrincipal();

if (ctx.getCallerIdentity("BeanUser")) {

System.out.println("It is the correct user");}

else{System.out.println("It is the incorrect user");}//more code}

B.

public void PrintData()

{@DeclareRoles("BeanUser")

@Resource SessionContext ctx;

@RolesAllowed("BeanUser")

Principal caller = ctx.getEJBHome();

if (!isCallerInRole(ctx)) {System.out.println("It is the correct user");}

else{System.out.println("It is the incorrect user");}//more code}

C.

public void PrintData()

{@DeclareRoles("BeanUser")

@Resource SessionContext ctx;

@RolesAllowed("BeanUser")

Principal caller = ctx.getCallerPrincipal();

if (ctx.isCallerInRole("BeanUser")) {

System.out.println("It is the correct user");}

else{System.out.println("It is the incorrect user");}//more code}

D.

public void PrintData()

{@DeclareRoles("BeanUser")

@Resource SessionContext ctx;

@RolesAllowed("BeanUser")

Principal caller = ctx.getCallerPrincipal();

if (ctx.getStatus("BeanUser")) {System.out.println("It is the correct user");}

else{System.out.println("It is the incorrect user");}//more code}

Questions 69

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

<web-app . . . .>

A Secure Application

...

<security-role-ref >

Manager

Admin

</security-role-ref>

<security-role>

Programmer

</security-role>

<security-role>

Admin

</security-role>

<security-role>

Employee

</security-role>

</web-app>

Which of the following is a valid isUserInRole() method call that can be made if request is the

HttpServletRequest request?

Options:
A.

request.isUserInRole("Programmer");

B.

request.isUserInRole("Manager");

C.

request.isUserInRole("Admin");

D.

request.isUserInRole("Employee");

Questions 70

Which of the following <security-constraint> sub-elements specifies which users in specified roles are permitted access to a resource collection?

Options:
A.

B.

<web-resource-collection>

C.

D.

<auth-constraint>

Exam Code: GSSP-Java
Certification Provider: GIAC
Exam Name: GIAC Secure Software Programmer – Java
Last Update: Sep 12, 2025
Questions: 275

GIAC Related Exams

How to pass GIAC G2700 - GIAC Certified ISO-2700 Specialist Practice Test Exam
How to pass GIAC GCFW - GIAC Certified Firewall Analyst Exam
How to pass GIAC GCPM - GIAC Certified Project Manager Certification Practice Test Exam
How to pass GIAC GISF - GIAC Information Security Fundamentals Exam
How to pass GIAC GISP - GIAC Information Security Professional Exam
How to pass GIAC GSSP-.NET - GIAC GIAC Secure Software Programmer - C#.NET Exam
How to pass GIAC GSSP-NET-CSHARP - GIAC GIAC Secure Software Programmer - C#.NET Exam

GIAC Free Exams

GIAC Free Exams
Prepare for GIAC certification with free access to reliable study resources and practice tests at Examstrack.