NishaP Raj

Greenhorn
+ Follow
since Jun 25, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by NishaP Raj

Hi,
In a doGet() method,
OutputStream os = response.getOutputStream();
byte[] ba = {1,2,3};
os.write(ba);
RequestDispatcher rd = request.getRequestDispatcher("my.jsp");
rd.forward(request,response).
Assuming "my.jsp" adds bytes 4,5,6 to the response which is correct?
Options:-
a.123
b.456
c.123456
d.456123
e.IllegalStateException is thrown.

Errata in one of the question in HFSJ 1st edition says flush and write both commit the response. So e should be the answer. But book mentions b. Please clarify?
Hi,
The following question should have the option C also checked.But the book doesnt do that.Can anyone clarify?

When creating session listeners which are true?
a.They are all declared in the DD.
b.Not all of them must be declared in the DD.
c.The DD tag used to declare them is <listener>.
d.The DD tag used to declare them is <session-listener>.
e.The DD tag used to declare them is placed within the <web-app> tag.
f.The DD tag used to declare them is placed within the <servlet> tag.

The given answer is b and e. But i think c isalso correct. Please confirm?
Hi,
Consider the following description of a tag in a TLD:

<tag>
<name>SmilyTag</name>
<tag-class>com.enthuware.ctags.SmilyTag</tag-class>
<description>
Replaces emoticons such as , , and with images.
</description>
<body-content>tagdependent</body-content>
<attribute>
<name>name</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>

Which of the following statements regarding the above tag are correct?

a.It is an empty tag.
b.It may be used as an empty tag.
c.It must implement BodyTag interface.
d.It may take an attribute named 'name'. But if present, its value must be dynamic.

The answer is b and c. Can anyone give the explanation for choice c.
HI,
I feel the answer of the following question is not correct. Can anyone explain?
Consider the web.xml snippet.

<web-app>
...
<security-constraint>
<web-resource-collection>
<web-resource-name>test</web-resource-name>
<url-pattern>/servlet/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>manager</role-name>
</auth-constraint>
</security-constraint>
...
</web-app>


In which of the following cases will the user be prompted for username/password?

Options:-
a.When the user clicks on a hyperlink displayed by <a href="/servlet/TestServlet">Test</a>
b. When the user clicks on the submit button of a form defined as: <form action="/servlet/TestServlet" method="POST">
c.For both option 1 and option 2.
d.For neither of option 1 or option 2.

Correct answer is c.
According to me,d. is the correct one since no http-methods are mentioned, no role will have access to any of the given url-pattern. Please explain...
To all the people who have given the exam already, please reply with the following queries:-
1.Does it show how many choices we have to mark as correct(as it shows in the mock exams) or just shows "Choose all that apply".
2.I read that now they have inlcuded 11 extra questions which will not count into the score. Is that true that now we have 80 questions in the exam?