This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Implementation of CLassic tag Handler Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Implementation of CLassic tag Handler" Watch "Implementation of CLassic tag Handler" New topic
Author

Implementation of CLassic tag Handler

Mohit G Gupta
Ranch Hand

Joined: May 18, 2010
Posts: 634

Here is a implementation of classic Tag Handler.It shows the use of doAfterTag().

Super.jsp


classic.tld



ClassicTagTest1.java




output:

MOvies NOW
Before BOdy
THor
After body


I am not able to get the other 2 elements of the String array in output.

doAfterTag() seems to be not runnning.

What can be the solution for this problem ?


OCPJP 6.0 93%
OCPJWCD 5.0 98%
Stoian Azarov
Ranch Hand

Joined: Jun 01, 2011
Posts: 113
Your doAfterTag() method is not executed at all. The problem is that the API method that you have to override is doAfterBody().
That's why it doesn't get called at all. The default implementation of that method is empty and it is skipping the subsequent body invocation.
Mohit G Gupta
Ranch Hand

Joined: May 18, 2010
Posts: 634

i have changed the method to doAfterBody.
still getting the same output
Hermann Laghom
Greenhorn

Joined: May 28, 2011
Posts: 18

After changed the method to doAfterBody, remove the Exception at the declaration and surround the out.println("a") with a try catch, and put your return in the else block


it should work.


OCJP 6, OCE JEE6 JSP and Servlets Developer
Mohit G Gupta
Ranch Hand

Joined: May 18, 2010
Posts: 634

Thanks for Help
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Implementation of CLassic tag Handler
 
Similar Threads
Classic Tag Handler
Classic tags. browser is not responding.
Unable to have tagdependent as body content for a classic tag
Unable to use El in custom tags
Unable to initialize TldLocationsCache: XML parsing error on file