Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6989125
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:10:16+00:00 2026-05-27T19:10:16+00:00

Pretty much everything in the title. The documentation isn’t clear about the consequences of

  • 0

Pretty much everything in the title. The documentation isn’t clear about the consequences of this call.

My particular situation is that this method is called with null passed in parameter and there is code before and after. I don’t get the purpose of this call…
Note that the context is a class extending SimpleTagSupport ( I’m doing taglib stuff).

Thanks for any pointer. Here is the javadoc :

invoke

public abstract void invoke(java.io.Writer out)
                     throws JspException,
                            java.io.IOException

    Executes the fragment and directs all output to the given Writer, or the JspWriter returned by the getOut() method of the JspContext associated with the fragment if out is null.

    Parameters:
        out - The Writer to output the fragment to, or null if output should be sent to JspContext.getOut(). 
    Throws:
        JspException - Thrown if an error occured while invoking this fragment. 
        SkipPageException - Thrown if the page that (either directly or indirectly) invoked the tag handler that invoked this fragment is to cease evaluation. The container must throw this exception if a Classic Tag Handler returned Tag.SKIP_PAGE or if a Simple Tag Handler threw SkipPageException. 
        java.io.IOException - If there was an error writing to the stream.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T19:10:17+00:00Added an answer on May 27, 2026 at 7:10 pm

    Well, it allows for a tag to receive a JSP fragment (the body of the tag) to execute when the tag wants to. For example, you could design an if tag which receives a condition argument, and has a tag body. If the condition is false, the tag doesn’t do anything. If it’s true, the tag invokes the fragment. A loop tag could invoke its fragment (executes the JSP code that is in its body) as many times as its iterationCount argument asks for.

    Since the fragment is probably used to generate some HTML code to include in the response, the out argument of the method is where the fragment’s output is generated. You might want to pass another writer if you want to postprocess what the fragment generates, for example, rather than letting the fragment write directly to the JSP writer.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got a view in my app that does pretty much everything, and I
Pretty much every other editor that isn't a vi descendant (vim, cream, vi-emu) seems
Pretty much what the title says really. We have some code that is .NET
Same for CMap, CList, and pretty much everything that uses templates (I guess). I
Pretty much everything is in the title here. I have an android tablet, a
Well the title explains pretty much everything. I want to use something like p
The title pretty much captures everything. I'm on linux, and I want to find
I'm building this client for a web service. Pretty much everything makes requests to
I've read all the posts about dashes and tried pretty much everything mentioned in
The title pretty much says it all. The precise error message that seems to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.