Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within OCPJWCD
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
paul wheaton
Ron McLeod
Jeanne Boyarsky
Sheriffs:
Paul Clapham
Saloon Keepers:
Tim Holloway
Roland Mueller
Bartenders:
Forum:
Web Component Certification (OCEJWCD)
clarification with SkipPageException
Deepaks Deshpande
Ranch Hand
Posts: 114
I like...
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hey Guys,
I am doing SimpleTag example and i am stuck up with the SkipPageException. Please help me out with the this.
1. package org.taghandler; 2. 3. 4. import java.io.IOException; 5. 6. import javax.servlet.jsp.*; 7. import javax.servlet.jsp.tagext.*; 8. 9. public class SkipPageException extends SimpleTagSupport { 10. 11. public void doTag() throws JspException, IOException { 12. getJspContext().getOut().println("Message from within doTag()...."); 13. getJspContext().getOut().println("About to throw a SkipPageException..."); 14. try{ 15. throw new SkipPageException(); 16. }catch (SkipPageException spe) { 17. // TODO: handle exception 18. System.out.println("Caught the SkipPageException ..."); 19. } 20. } 21. }
I am getting the following errors on line no.15 and line no. 16.
No exception of type SkipPageException can be thrown; an exception type must be a subclass of Throwable
Thanks,
Deepak.
Regards,
Deepak
Nikos Pougounias
Ranch Hand
Posts: 110
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi,
The problem is that your class has the same name as the exception you want to
test
.
Actually which class should be at line 15: javax.servlet.jsp.SkipPageException or org.taghandler.SkipPageException?
Nikos' Java blog
Deepaks Deshpande
Ranch Hand
Posts: 114
I like...
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Thanks it was a silly mistake but a grave one
Regards,
Deepak
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
SkipPageException problm
cannot be resolved to a type
SkipPageException
Doubt in simple tag and classic tag access
Compiling Error.
More...