Discussions

Web tier: servlets, JSP, Web frameworks: write JSP to HTML file

  1. write JSP to HTML file (2 messages)

    I have a requirement to convert JSPs to static HTML files. There are some views of the application that change weekly. The idea is to update the data that the JSP runs on and then create a snapshot (static HTML) of the JSP which includes the dynamic portion. (I realize it sort of defeats the purpose of JSP, but it's not my idea)

    How can I do this? It's easy enough to create an HTML file from a servlet because I have control of the IO. But with JSP I don't see how to do this.

    Any ideas?

    Threaded Messages (2)

  2. write JSP to HTML file[ Go to top ]

    You could hit your JSP weekly with a simple java client that acts as a browser (like a getUrl utility). It will receive the response from your JSP, you then strip out the headers and write the HTML to a file.
  3. write JSP to HTML file[ Go to top ]

    Thanks Jessica. I'll try that.