Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

GIAC Exam GSNA Topic 5 Question 45 Discussion

Actual exam question for GIAC's GIAC Systems and Network Auditor exam
Question #: 45
Topic #: 5
[All GIAC Systems and Network Auditor Questions]

You work as a Software Developer for UcTech Inc. You want to create a new session. Which of the following methods can you use to accomplish the task?

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

Show Suggested Answer Hide Answer
Suggested Answer: C, D

The getSession() method of the HttpServletRequest interface returns the current session associated with the request, or creates a new

session if no session exists. The method has two syntaxes as follows:

public HttpSession getSession(): This method creates a new session if it does not exist.

public HttpSession getSession(boolean create): This method becomes similar to the above method if create is true, and returns the

current session if create is false. It returns null if no session exists.

Answer B is incorrect. The getSession(false) method returns a pre-existing session. It returns null if the

client has no session

associated with it.

Answer A and E are incorrect. There is no such method as getNewSession() in Java.


Contribute your Thoughts:

Tuyet
1 days ago
Yeah, but what about C? getSession() looks like it might work too.
upvoted 0 times
...
Hyman
2 days ago
This question is tricky. I think A and D could be right.
upvoted 0 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77