Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link

Pierre Schuffenecker

+ Follow
since Mar 11, 2005
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 Pierre Schuffenecker

Jose, Siva,

you pointed the problem.
The answer:
"Tag3Handler may use the getParent method twice to gain access to the instance of Tag1Handler"
is true, but only if the TagAdapter is used.
Without that, it is wrong.

I think that the HF team must clarify that.

I have an issue regarding to the answer for the mock exam question 3 of the chapter 10 (custom tags) from the HF servlets and JSP book.

I have:

Tag1Handler extends TagSupport for tag1 (a Classic tag)
Tag2Handler extends SimpleTagSupport for tag2 (a Simple tag)
Tag3Handler extends TagSupport for tag3 (a Classic tag)

It is said that Tag3Handler must use getParent() twice to access the Tag1Handler instance.

But, on page 540, I can read:
"Using getParent() method, a Classic tag can access Classic tag parents, and a Simple tag can access either a Classic or Simple parents".

By runnig getParent() the first time, Tag3Handler will access the Tag2Handler instance, which is an instance of a Simple tag!
So... how can I run getParent() a second time on that result, if a Classic tag cannot access a Simple Tag parent?
I have the same issue with Tomcat 5.5.7 and JVM 1.5.0_01-b08 on win2000, but works fine with winXP.

A fix of win2000 seems to be the reason, but don't know more.
I tried on a win2000 SP4 (without any additionnal fixing from MS) and works properly.
Thanks to all ...

I really mean that there is a problem with my J2EE environment on my PC.
I tried yesterday evening with another computer ... and everything worked as expected.

I don't understand why it doesn't work properly.
After 3 full clean-up and re-install, I still have this issue.

As you said, maybe someone involved in Tomcat can explain this problem ...

Thanks for your help

this is just to clarify the situation.

I completly removed all java and tomcat stuffs, then started from a clean environment.
I run now:
- j2se 1.5 (the latest one)
- tomcat 5.5.7 (that supports servlet 2.4 and jsp 2.0 specs)

I recreated a (very) small web app to check the error management (the same as before) and included (just to be sure) the JSTL libraries in my WEB-INF/lib folder.
tested ...
and I always get the same issues:
- while setting the error pages with the DD, the container doesn't redirect to the error page.
- while setting the error page with the page directive, I am correctly redirect to the "error page", but only if this page is not set as an error page (isErrorPage = true).

-> Bassam Zahid

I tried that you proposed ... and I always have an error.
The strange thing is that using

in my error page, I saw a NullPointerException on the the exception object!
I checked the translated code from my error page, and everything seems to be fine.

while testing with EL ( ${pageContext.exception} ), I always have an HTTP 500 error and nothing in the logs.

I tried with the 2 last available version from J2EE.
I will maybe retry with an older version.

Originally posted by Nitish Bahadur:
What do you get when you use getMajorVersion() and getMinorVersion() in this updated container of yours? Additionally, which DTD(the first few lines of your web.xml) are you using?

I mean, you wanted to talk about major and minor version available from the application object ...
in that case, I saw the following:
MajorVersion = 2
MinorVersion = 4

Don't know what exactly it means.
But there is something more strange ...

I noticed that I worked with an older version of J2EE. To have access to the new features from J2EE 1.4 and JSP2, I updated my environment with the last version provided by SUN (eg. 2005Q1 UR1). And now start the troubles ...

There is no way to access an error page while setting error management only in my web.xml (with <error-page>) . The application always fails with an HTTP 500 - internal server error!

While redirecting error with the "errorPage" attribute from the page directive, I can access my custom error page ... but only if this page is not set as an error page (using the "isErrorPage" attribute):
If isErrorPage is set to "false" or not specified, the error page is accessible and I can access the exception implicit object

If isErrorPage is set to "true", the application failed with an HTTP 500 - internal server error

I am really confused with that, because I follow the JSP2.0 specs, and that doesn't work at it MUST.

all helps are welcomed !

I tested that with the previous J2EE version (from june 2004), and still have the problem.
[ March 18, 2005: Message edited by: Pierre Schuffenecker ]
${pageContext.errorData.throwable.cause} returns nothing ...
${pageContext.errorData.throwable.rootCause} generates an error: rootCause not available.
That was a good sugestion ... but I tried that before ... and still the same problem.

At this time, I am really confused by this stuf (see my other post for more details).

thanks again to spent some time on that
Hi everybody.

I hope that someone could help me on that.
I really have some strange things while working with the page directive attribute "isErrorPage" and the the <error-page> tag in my DD file.

I am currently working with the last version of the Sun Java System Application Server environment (2005Q1 UR1). Maybe doe the problems come from that?

while setting the page directive attribute "isErrorPage" to "true" (on my errorPage) and adding in a (bad coded) page the page directive attribute "errorPage" to access it (eg. my errorPage), I always have an "HTTP 500 internal server error".
But, if isErrorPage = false (or is not added), everything is fine. I correctly access my error page ... and I can access the excetion implicit object!
(looking at the JSP2.0 spec ... there is something wrong!)

If I use the DD file to set up error pages, I always have the "HTTP 500 internal server error" while accessing the error page.

Nota: my error page is correct. Everything is OK when I try to access it directly. I only have an issue when a runtime error occurs and the system tries to access my error page.

All comments are welcomed

first time I post here and I am currently preparing the SCWCD exam using the HF Servlets and JSP book (a great one ...!).

here is my question:
I noticed that when configuring the error page only in the DD file, I am not able to get the exception object from the pageContext in my errorPage.

I added in the DD:

my error page:

my test page:

when calling the test page, I see the errorPage (display: you generated an error , but there is nothing about the exception.

but ... when adding in the test page, I see the complete error message:

You generate an error:
java.lang.ArithmeticException: / by zero

I thought that when you set a page as an errorPage (with the page directive), you always can access the pageContext.exception object.

Did I something wrong?