Bernhard Weyrauch

Greenhorn
+ Follow
since Oct 16, 2013
Bernhard likes ...
Firefox Browser Tomcat Server Java
Merit badge: grant badges
For More
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 Bernhard Weyrauch

Frits Walraven wrote:
In other words: 18 is the correct answer (and the book is wrong) as you can override the jspInit method. Declaring a method with name _jspInit is not allowed.



Great!! Thank you so much :-)
Next time, I'll directly check JEE Spec

Bernhard
Hi guys, thanks for this discussion here. I have same question as Joey initially had and did not find the final statement.
I also checked Errata http://garnerpress.com/catalogue/BK0340/errata.html but this corrections isn't there.

I also tried to change the code to:

but the JSP doesn't compile (of course).

Error:
An error occurred at line: [36] in the generated java file: [C:\Program Files\XAMPP\tomcat\work\Catalina\localhost\OCEJWCD\org\apache\jsp\jsp\Chapt13Quest12_jsp.java]
Duplicate method _jspInit() in type Chapt13Quest12_jsp

Stacktrace:
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:103)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:366)
at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:468)
...

So, what is the final answer?
Thank you so much!

Bernhard