Dagbj�rn Nogva

Greenhorn
+ Follow
since May 20, 2007
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 Dagbj�rn Nogva

Hi Sandeep,

This is how the javadoc page of java.net.URI defines absolute and relative URIs.

An absolute URI specifies a scheme; a URI that is not absolute is said to be relative.



This appears to be in line with Hanumant Deskmukh's definition.

Cheers,
Dagbj�rn
Hi Rina,

I guess you mean the setter should take a String type argument (not return a String type value).

Yes, your assumption is correct. If <rtexprvalue> is false, it means that only static values can be specified for this attribute and static values can only be of type String.

This is how the JSP 2.0 spec explanes the optional <type> subelement of the <attribute> element.

Defines the Java type of the attributes value. For static values (those determined at translation time) the type is always java.lang.String.



Cheers,
Dagbj�rn
Hi Rina,

According to the JSTL 1.2 spec, the valid formats of <c:set> are the following when used to set bean properties/map values:



As you can see, both target and property are required tag attributes. It is only the value attribute that alternatively can be specified by the tag body. Hence, your second code snippet is a violation of the spec.

Cheers,
Dagbj�rn
Hi Patrick,

You need to add the classes directory to the -classpath on the javac command line, otherwise the compiler won't find Dogs.class when compiling MyServletContextListener.java.

Cheers,
Dagbj�rn
Hi Nagalatha,

can anybody clarify my doubt regarding where to place TLD files and Tag Files in dd if jared and if not jared



In JSP 2.0, which you need to know for the exam, I believe there is no case where a taglib mapping (TLD) needs to be declared in the DD (web.xml). However, it is supported by the taglib element, a subelement of the jsp-config element. This applies even for TLD files and TAG files located in a jar file.

There is one rule for TAG files located in a jar that you should be aware of. For such a file you need to explicitly declare the TAG file in an appropriate TLD file, otherwise the container is supposed to ignore the TAG file. For all other TAG files, there is no need to declare them in a TLD.

Then you have the rules for where to place TLD and TAG files, but since your question specifically asked about the DD, I leave them for now.

HTH,
Dagbj�rn
Hi,

One explanation could be the presence of an el-ignored element in the DD.



This element will turn off EL evaluation in all *.jsp files, but may be overridden by a <%@ page isELIgnored="false" %> directive in an individual JSP page.

Dagbj�rn
Hi Kamal,

In my opinion, HFSJ is definitely recommendable. I didn't use any other study guide, so I cannot really compare it with the other alternatives available.

There are at least two issues with the HFSJ that you should be aware of.

1. On page 254, it is stated that HttpSessionActivationListener must be registered in the DD. This is wrong and it took me a couple of failed mock exam questions to realize it. Neither HttpSessionActivationListener nor HttpSessionBindingListener should be specified in the DD.

2. Dynamic attributes is not really covered by HFSJ. There is a coffee cram question on this topic, but that's all. Beware that you might face questions about dynamic attributes on the certification exam. I know. I got two of them! So make sure to learn the basics. There is a tutorial written by HFSJ-author Bryan Basham available in this newsgroup. Please check it out!

These are the two issues I really remember. Both are serious enough to cost you failed questions on the exam.

Cheers,
Dagbj�rn
Hello Hendy,

I believe the short answer is no.

The following is copied from the javadoc of the TryCatchFinally interface, an auxiliary interface that a Tag, an IterationTag or a BodyTag can implement. doAfterBody should be called somewhere between doStartTag and doEndTag, so any exceptions here will cause doEndTag to be skipped.



This is also supported by the JSP 2.0 spec, page 2-52, The Tag Interface.

If an exception is encountered during the evaluation of the body of a tag, its doEndTag method will not be evaluated. See the TryCatchFinally tag for methods that are guaranteed to be evaluated.



HTH,
Dagbj�rn
Hi Kamal,

I have recently cleared the SCWCD exam. Like you, I had a fair understanding of servlets and also a bit of JSP and custom tags background, but little knowledge of EL. I started the preparation about mid-February and cleared the exam on May 2, about 2 1/2 months all together.

I used the HFSJ as my study guide and studied about 2 hours per day. (Slightly more during weekends.) After I had completed the HFSJ, I spent a couple of weeks on a thorough repetition of the entire book. I found the repetition very useful and recommend it highly. During this period I produced a lot of study notes. Also, I did a lot of API, lifecycle, DD and TLD memorizing. And, of course, just learnt the implicit objects offhand :-)

After this I spent a few bucks buying the exam simulators from both WhizLabs and Enthuware (JWebPlus). So the last three weeks I spent doing mock exams, typically 1/3 or 1/2 exam at a time. Doing a full exam of 69 questions straight each time is too tiresome. Beside that, I often spent more time going through the answers, right or wrong, then on actually answering the questions.

I found doing a lot of mock exams very useful since this helped me to identify my weak points. During this period I referred to the servlet, JSP and JSTL specs extensively.

Keep up the study and good luck on the exam!

Cheers,
Dagbj�rn
Hi Anant,

> java.lang.UnsupportedClassVersionError: com/example/web/BeerSelect (Unsupported major.minor version 49.0)

This looks like a Java version issue. Could it be that you have a mixup in the Java version used by your IDE, build.xml and/or servlet container. I remember I had a similar error some time ago. As far as I can recall, it was a conflict between Eclipse which compiled for Java 5, but the servlet container was WebLogic 8.1 running on Java 1.4.

HTH,
Dagbj�rn