Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!

S Kapoor

+ Follow
since Mar 31, 2006
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 S Kapoor

I have calculated my percentages based on number of questions wrong (out of 69) since this is how Sun does it. NOT the way Whizlabs reports. I dont know why they do it the other way.
Hi all,
I cleared my SCWCD exam with 94% yesterday. The HFSJ made the preparation process really fun and I feel like I might actually remember a lot of this stuff in real life. Thanks to everyone here also.

I mostly read only the HF book, but I browsed through the specs in the last week.

This is what I was scoring in the last week:
HF final exam: 65%
Whizlabs 1: 74%
WZ 2: 81%
WZ 3: 81%
WZ 4: 77%
WZ 5: 73%

I have calculated my percentages based on number of questions wrong (out of 69) since this is how Sun does it. NOT the way Whizlabs reports.
[ February 14, 2007: Message edited by: S Kapoor ]
Filter mappings dont work like servlet mappings in that there is no order of preference for matches. The no1 is recipes/* and that is a match. Thats all it cares about. It is earlier in the DD and hence it is earlier in the filter invocation order.
The taglib and include directive, yes.
But you cannot use the page directive in tag files.
Refer to section 8.5 from the JSP spec.
Duh. I just realized that the I ve been reading a draft and not the final version all this time.

Thanks for you help (and patience). Apologies.
I cannot find any related information in the spec. There is no explicit list of implicit objects that can be used in a tag file. They list only the directives available in tag files.

I read an article on that says that jspContext is the implicit variable available in tag files in place of pageContext.

I would appreciate it if someone can explain or point to a specific line in the spec.
I understand that all implicit variables should be available inside a tag file, because that too is a jsp.
However in the final exam in HFSJ, Q4, option D is:

<%@ attribute name="data %>

They say that this is not invalid because: "The JSP variable pageContext is not available here. However replacing pageContext with getJspContext() would work here instead."

Can someone please explain? Why cant the pageContext implicit variable be available in the tag file?
A couple of things here:

If Result is a jsp file, the web.xml should read as follows:
<servlet-name>Hobby Page</servlet-name>

Also, jsp files should not be placed under the classes directory. They should be either webapp directory (or a subdirectory there) or under WEB-INF (if you dont want clients to directly access the jsp).
Accordingly modify the <jsp-file> element to point to the jsp.
[ February 05, 2007: Message edited by: S Kapoor ]
Java class names should not be lower case. You should call it Result instead of result.
But this is not the reason the Classloader cannot find the class. Does it belong to any package?
Confirm that this is the name and location of the servlet class:
Not sure if you cut/paste the web.xml, but if you have, the element name should be <servlet-mapping> not <servlet-mappling>
Have you implemented the doGet in the servlet?
That makes sense.
Thanks for the prompt answer!!
In a whizlabs question:
Which of the fol. is true about one-way invocation?

1: The client waits until an HTTP response is received or an error occurs.
2: The client call is not waiting for a response and returns immediatly.

Shouldnt the right answer be 2? The whizlab answer is stated as 1.