Andriy Fedotov

Ranch Hand
+ Follow
since Mar 07, 2008
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Andriy Fedotov

89% : 62 questions right out of 69. 2% more than my result on SCJP6

Read Head First Servlets & JSP 2 times, api and specifications for servlets, jsp and jstl.

Thank you guys for such a good resource where I found answers to almost all my questions. Used a search on this forum a lot!

Good luck to those who are still on the road to exam!
14 years ago
inside <security-role-ref> you link a user role name (for example, "admin") to another name (like "super_user"), used inside isUserInRole method of your servlet.

it's mainly used when you have 3rd party servlets or you decided to have an abstract role name in your servlet code

syntaxes of <security-role-ref> is


to activate authentification in your web application you should specify <login-config> in your DD
So, am I supposed even not ask question about this?

You know, the name of this forum is "Professional Certification, SCWCD", so it's completely OK to ask such kind of thing like what is in the certification exam and what's not.

I guess everybody who read this forum know that the more you know the better for you. Otherwise this people won't be here.
[ May 20, 2008: Message edited by: Andrew Fedotov ]
Can anybody else confirm that there are no beanName questions on exam?

I have some strange behaviour of doInitBody() method of my class that extends BodyTagSupport

I do pageContext.getOut().println("doInitBody"); inside doInitBody() method but nothing happens.. At the same time I see that this line executes..

Here's the source:

inside tld


Thank you in advance!
HFSJ p. 430 question 12


How would you include dynamic content in a JSP, similar to a server-side include (SSI)? (Choose all that apply)

A. <%@ include file="/segments/footer.jspf" %>
B. <jsp:forward page="/segments/footer.jspf"/>
C. <jsp:include page="/segments/footer.jspf"/>
D. RequestDispatcher dispatcher = request.getRequestDispatcher("/segments/footer.jspf"); dispatcher.include(request, response);

D (wrong): Option D would be correct if it was a scriplet: it functionality does the same thing as option C, but its syntax is only used in servlets.

Does it mean that the only reason why option D isn't correct is that there're no <% %> around this code?..
according to

<xsd:element name="tlib-version" type="j2ee ewey-versionType">
<xsd:element name="short-name" type="j2ee:tld-canonical-nameType">
<xsd:element name="uri" type="j2ee:xsdAnyURIType" minOccurs="0">


in taglib only tlib-version and short-name are mandatory, right?
there's an element run-as at the servlet element of the deployment descriptor.
does anyone have any clue what is it for?
servlet 2.4 specification says: "the run-as" element specifies the identity to be used for execution of a component. could somebody say what does it means in english?
thank you a lot
Thanks for the answers.

So, am I right in this:



only admin have an access to get method, for other methods - everybody



everybody have an access to all methods


<!-- no <http-method> tag -->

nobody, including admin have an access to any method
Head First 1st Edition:

p. 634:
If there are no NO <http-method> elements it means that NO HTTP Methods are allowed by ANYONE in ANY role

p. 660
There's an example where no <http-method> is specified. There's a commentary: We left off <http-method> so that NO HTTP Methods are accessible by ANYONE except Admin (there's a <auth-constraint> with this role coming after <web-resource-collection>

So, does that mean that:
1) if I specify <http-method/> than no methods are allowed to anyone by any role, including the one that i specify in the <auth-constraint>
2) id I don't specify <http-method> at all than no methods are allowed to anyone except roles, specified in the <auth-constraint>
sorry guys, i found out what was the problem.

for http errors like 404 i should have used <error-code> in the <error-page>



works well