Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

custom taglib ; SKIP_PAGE does not work As I expected  RSS feed

 
Killeroms kleos
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have a problem with my taglib, In case of error I want to display something one the page before stopping processing the rest (this is kind of a rest web service and i want to display errors in xml )


in my tag class I override the doEndTag method like this:


But unfortunately when I use SKIP_PAGE nothing is written to the page (this seems to mean: stop processing page and do not ouput anything from this tag)

I tried to flush before the return statement but it is not allowed.

Do you have any idea of how do it ?
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 36406
454
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Killeroms,
Welcome to JavaRanch!

How about throwing a JSP Exception which would direct you to another page that displays the error messages.

Or a more MVC solution where you call the web service from a servlet (or delegated class) and the JSP knows if there is an error before painting the page?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!