File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem compiling my listener class

 
Emmanuel Okandeji
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please am having problem compiling Listener class... whenever i try to compile the code it gives me this Error.

Unreachable statement
ServletContext sc = event.getServletContext();

Here is my code....


Please can someone help me...... Thanks
 
Piyush Mangal
Ranch Hand
Posts: 196
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
throw new UnsupportedOperationException("Not supported yet.");
As soon as above statement executes, the control never returns to this method again, that is why you are getting statement unreachable execption.
[ July 18, 2008: Message edited by: Piyush Mangal ]
 
Emmanuel Okandeji
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank You Very, Very much.
 
alex savu
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had the same problem and I noticed that deleting the "throw UnsupportedException" instruction solves the problem. My question is why does the IDE (I am using NetBeans 6.01) keeps automatically inserting this throw instruction everytime I override a method from an interface? What's the use of this exception and what should I look out for when I erase the throw declaration? I could not find any obvious info about this on Google or the Java API, so please give me some pointers if you know anything about this subject. Thanks, all the best!
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64194
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"key pad", please check your private messages for an important administrative matter.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic