This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes HF p176 example compile error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "HF p176 example compile error" Watch "HF p176 example compile error" New topic
Author

HF p176 example compile error

ming wu
Ranch Hand

Joined: Oct 11, 2004
Posts: 59
Maybe there is a typo in my code, but my codes are compiled without error.
I got this error msg when i try to run the example.

Thanks



SCJP,SCWCD,SCBCD<br />Oracle 10g OCA DBA in progress<br />------------------------<br />Good judgement comes from experience, and experience comes from bad judgement.
peter greaves
Ranch Hand

Joined: Sep 27, 2002
Posts: 51
you want to paste yr servlet code here? clearly the container is calling service() and service can't find doGet()

your servlet will compile with doGet() "incorrectly" over-riddden : there's no law against that.


SJCP 1.2
Kathy Sierra
Cowgirl and Author
Ranch Hand

Joined: Oct 10, 2002
Posts: 1572
Hello Ming,
I think I need a little more info as well... there isn't any code on page 176, so I'm not sure exactly where your issue is.

Thanks!!
-Kathy
Sharon
Greenhorn

Joined: Oct 11, 2004
Posts: 12
I got compile errors as below:

D:\tomcat\webapps\listenerTest\classes\com\example\ListenerTester.java:11: cannot resolve symbol
symbol : class Dog
location: class com.example.ListenerTester
Dog dog= (Dog) getServletContext().getAttribute("dog");
^
D:\tomcat\webapps\listenerTest\classes\com\example\ListenerTester.java:11: cannot resolve symbol
symbol : class Dog
location: class com.example.ListenerTester
Dog dog= (Dog) getServletContext().getAttribute("dog");
^
2 errors

Any one can help?


SCJP 1.4 SCWCD 1.4 (preparing)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HF p176 example compile error
 
Similar Threads
HTTP error 405
HTTP Status 405 - HTTP method GET is not supported by this URL
Get method error
doget(),doPost(),do Trace(),doOption()
refresh in post method