Discussions

Web tier: servlets, JSP, Web frameworks: Executing JSPS in code

  1. Executing JSPS in code (3 messages)

    I have a need to execute a jsp and get the resulting HTML in a method. I figured out a way to do it if it the jsp is stored as a file in the hard drive. But I am looking for a way to execute a jsp which is actually dynamically generated and stored in a string.
    Is this even possible?
    I looked at the jasper classes and everything seems to be based on file.
    Any info will be greatly appreciated

    Threaded Messages (3)

  2. Executing JSPS in code[ Go to top ]

    You could make an http call to the jsp's url and convert the stream to a string.
  3. Executing JSPS in code[ Go to top ]

    true.
  4. Executing JSPS in code[ Go to top ]

    See for example Eval taglib from Coldtags suite:
    www.servletsuite.com/jsp.htm