Hi, Here is my question found in Whizlabs Exam Simulator:
Which of the following JSTL fragment will not delete the "empName" attribute from "session" scope? Select one choice. a. <c:remove name="empName"/> b. <c:set var="empName" scope="session" value=""/> c. <c:remove scope="session" name="empName"/> d. both a and b e. None of the above
I think the answer is a and c. Because <c:set> syntax is <c:remove var="varName" [scope="{page|request|session|application}]/> not <c:remove name="..." ..../>
But when I checked answer, it shows e. Can anybody help me figure it out? Thanks.
I didn't catch the the var/name error. I agree! Good Catch! If it were var instead of name, they would all remove the empName attribute. A null value on c:set will remove the empName attribute. That information can be found on pg 25 of the JSTL spec (sec 4.3).
Thank you all for replying my question. I passed SCWCD this past Saturday at 84%. From my experience HFSJ is enough for passing the exam. I also did some mock exams from whizlabs simulator (My scores on whizlabs are very close the the real exam).
I don't know why nobody mentioned this before, but your display name does not meet our naming policy. Please read it, follow the link at the bottom, and change your name to something appropriate.
Thanks!
Post by:autobot
them good ole boys were drinking whiskey and rye singin' this'll be the day that I die. Drink tiny ad.
a bit of art, as a gift, that will fit in a stocking