Discussions

Web tier: servlets, JSP, Web frameworks: Calling jsp and catching the html

  1. Calling jsp and catching the html (3 messages)

    I would like to use a jsp to build a string of html, but not have it returned to the user. For example, this jsp might be called from another servlet or a tag library class.

    I'd like to use a jsp because it may contain includes or other tag library elements.

    Any thoughts on how to do this?
  2. Make a URL connection to the JSP and store the returned content wherever you want to store it.
  3. I was hoping to keep the session information available from the original session.
  4. Calling jsp and catching the html[ Go to top ]

    write a tag extended BodyTagSupport, then getBodyContent().getString() to get whatever generate from the enclosed context.