This week's giveaway is in the Java in General forum.
We're giving away four copies of Java Challengers and have Rafael del Nero on-line!
See this thread for details.
Win a copy of Java Challengers this week in the Java in General forum!

anders eriksson

Greenhorn
+ Follow
since Nov 02, 2001
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 anders eriksson

Hi,
thanks to the links, hints, study guides and tips of JavaRanch together with my programming experience I today passed the SCWCD exam with a score of 81%. I think the level of difficulty was slightly above the Suns mock exam and for example JDiscuss daily questions. The real exam is simpler that Eduardos questions, but you learn a lot of details from his page...
Thanks!
Anders Eriksson
SCJP2 + SCWCD
Hi,
the name ServletContextAttributesListener was in specification draft, but for final 2.3 release it was changed to ServletContextAttributeListener.
/Anders
I think run-as has to do with calling EJBs from your web app. It allows your app to become a certain user in the view of the called EJB.
Haven't tested it though...
/Anders
But then there's also objective 3.3 "Distinguish the behavour of the following in a distributable:
- Servlet context init parameters
- Servlet context listeners
- Servlet context attribute listeners
- Session attribute listeners"
I understnad there's always ONE context object per VM, i.e. in a distributable web app, there can be several context objects, who's state can be differet. Therefore a context init parameters, listeners and attribute listeners can be different too.
Sessions are - on the contrary - shared across the the JVM, so that a session attribute listener will always get the SAME events, regardless of which JVM it resides in.
This is my understanding, do you agree?
/Anders
Congratulations!
You mention there where no questions about "filters", but it can't be any, can it? It is not listed in the objectives.
/anders
Hi,
I am preparing for SCWCD and I understand that there will be quite a few questions about the web.xml deployment descriptor. I can read DTD and other docs, but I would really like to see a DD that has examples of everything a DD can have. By doing so I can visualize it, get a better feeling of the structure and the order of different elements and attributes.
Is there a good example out there?
Most examples I have found are just servlet element and a servlet-mapping or two... I want it all - servlet, servlet mappings, listeners, init params, roles, you name it!
/Anders
12.6: I think they mean "SKIP_BODY" and "SKIP_PAGE" instead of "BODY" and "PAGE". The object is probably that you should understand which method can use which constant. JSP specification sais:
"public static final int SKIP_BODY
Skip body evaluation. Valid return value for doStartTag and doAfterBody.
public static final int SKIP_PAGE
Skip the rest of the page. Valid return value for doEndTag."

10.2: When beans are used in JSP they are set to a certain scope level. The objective is to understand what scope level corresponds to which object in a servlet contex.
For example page 4 of this resource http://java.sun.com/products/jsp/pdf/card12.pdf gives:
request = HttpServletRequest
session = HttpSession
application = ServletContext
/anders
...but isn't also option 3 correct? Doesn't a AttributeListener also get notified when a attribute is "implitcly" deleted and "implicitly" added by an unbinding and binding respectively?
/anders