aspose file tools
The moose likes JSP and the fly likes custom taglib ; SKIP_PAGE does not work As I expected Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "custom taglib ; SKIP_PAGE does not work As I expected" Watch "custom taglib ; SKIP_PAGE does not work As I expected" New topic
Author

custom taglib ; SKIP_PAGE does not work As I expected

Killeroms kleos
Greenhorn

Joined: Mar 27, 2009
Posts: 1
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 26193
    
  66

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?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: custom taglib ; SKIP_PAGE does not work As I expected
 
Similar Threads
classic tags
Return SKIP_PAGE from doStartTag()
How to use custom tag?
Classic Tag Handler problem
Classic Tag Handler problem