Neil Mc

Ranch Hand
+ Follow
since Oct 20, 2003
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 Neil Mc

I thought there may have been an error with this question as well, but for a different reason.

I thought that the only correct answer should be (a) i.e. NOT (c) as a <jsp:include> is used to include dynamic content and the question distinctly asks how you should include static content.
Cheers Kathy, and Giju... I just tried to compile that return value and it looks like you're right (and wizlabs are wrong )

Thanks.
Hi,

On a simulated exam I sat, one of the questions stated that returning EVAL_BODY_BUFFERED from a class which extends TagSupport would cause a runtime exception and NOT a compiler error. It said that the compiler could not check this at compile-time ?

As EVAL_BODY_BUFFERED is defined in BodyTag (which is a peer to TagSupport) I'm wondering why the compiler can't check this at compile time ?

I would have thought that as the compiler can't see this constant, then it could indeed carry out a compile time check.

While, I'm on the subject.... the question contains the following (which it doesn't see as an error).....



I was under the impression that the body of a custom tag CANNOT contain scripting elements ? Is this not the case ?

Any help, much appreciated,

Neil
[ November 01, 2004: Message edited by: Neil Mc ]
I'm in a similar position to yourself, but I would imagine the questions are pretty random, following a general theme. I.e. obviously the larger topics will get a greater weighting but I don't think that 20 questions on JSTL / custom tags in one sitting would imply the same for any other sitting.

Going by the SCJP certification, I think they like to test people on, pretty much, the whole spectrum.

This is just my opinion.

Ta - Neil.
what would happen if, on receiving a request, we could map that request to more than one servlet - and one was just as specific as the other? e.g. if we had two <servlet-mapping> tags, each with a <url-pattern> of, say...

<url-pattern>*.stuff</url-pattern> ?

Is this valid ?

Just curious is all.

Thanks.
Again, thanks Kathy.

Don't think I've ever read a book where the authors are so readily on-hand to answer queries.

Top notch support
Excellent guys.

Thanks for your responses.
Line 4 of the code.....



Looks defined to me.
Yup - Polymorphic references.

The spec seems to say that class can only be ommitted if 'type' is included (i.e. and attribute already exists).

The bullet points on page 414 say "The 'class' attribute is optional". This isn't strictly true and is at best ambiguous on this point.
null.

I see what you're saying, but the attribute is defined.... and maps onto a key which isn't present in the Map..... which would also return null. Which in this case is false.

So, you're saying that is part of the answer ? The explanation says nothing about it, which is a little misleading.

If thats the case, I'm delighted as it means my original understanding of the situation is correct.

Is it ? or am I missing something else here...... ?
Hi,

In the coffee cram for ch 8 question 11 (regarding the <jsp:useBean> std action) there seems to be an ambiguity...

Answer D is given as correct i.e. the statement... "Either the class or type attributes may be specified, but at least one" is given as true.

However, in the bullet point section (pg 414) it states that "the class attibute is optional" (and makes no mention of the type attribute). This makes sense as, in the case where the Bean already exists as an attribute, neither the class or type attributes are required - as the container does not need to create a new object.

The coffee cram answer and the bullet point seem to conflict with each other.

So, which is the case... is 'id' the only required attribute in <jsp:useBean> ?

Thanks for your time,

Neil.
Not sure if I'm missing something about the syntax of the [ ] operator in EL. HFS states that if the thing within the brackets in not in quotes, it is evaluated as an attribute...

On the 3rd question down, in HFS page 393 we have...



Now... integer is not in quotes, so its evaluated as an attribute. We have an 'integer' attribute which evaluates to an Integer object with a value of 3. So does that not evaluate to...



Which would result in the '3' being treated as a key into the requestScope map ??? and there is no '3' key into the requestScope map (i.e. no attribute in that scope with the name 3.

What I'm trying to say, in my long-winded way, is should integer not be in quotes ??? This way it would just be treated as a key into the requestScope map. i.e.




Thanks.
Just downloaded (and paid for !!!) the simulator for SCWCD 1.4 from wizlabs. It has in total 3 practice exams as opposed to the the 12 or so that the wizlabs SCJP sim offered !!! And its the same price !!!

(In addition to the 3 practice exams, theres the usual quiz and trial elements etc).

Just thought you all should know.
You don't need to be currently working on that area. I haven't touched any Java in about a year and have been stuck coding in C++ (boo !!!) since. I'm currently using HFS to prepare for the SCWCD, with no previous servlet / jsp experience, and reckon I'm heading for a decent pass (while trying not to jinx it with that statement )
In HFS pg 643 the example Deployment Descriptor has more than one <web-app> tag. Is this allowed ?

I had always just assumed that the <web-app> tag was the root tag of the document. This seems to be backed up by the fact that each web application must have its own web.xml file (in WEB-INF).

Slightly confused...