Move data from JSP to HTML

Posted on 2004-11-28
Last Modified: 2010-04-01
I have a some data that has been calculated in jsp file that is in a table. I want to transfer (programmatically) these contents of the JSP into an HTML file. I want a use to open the html and find the staff that had been calculated in jsp
Question by:VbMonk

    Expert Comment

    dont get quite right ur question

    Author Comment

    write all contents of jsp into an HTML page
    LVL 3

    Accepted Solution

    And why do you want to do it?
    HTML pages have static content. You can use JS to read and display some data that had been sent to such page (as the request parameters), but that's all. Use JSP if you wish to have dynamic content.
    LVL 3

    Expert Comment

    PS. I'm not quite sure, but you probably would be able to generate new HTML page (that is: create new file on the server with .html extension) from the JSP scriptlet. Still, I don't have idea why anyone would like to do something like this. 8-|
    LVL 4

    Assisted Solution

    File file = new File("newfilename.html");
    PrintWriter myout = new PrintWriter(new BufferedWriter(new FileWriter(file)));

    /* ur jsp code...........      

    LVL 29

    Assisted Solution

    This question makes no sense. An JSP IS HTML as far as the browser is concerned. That is the beauty of it. I sense a troll from an MS drone!

    If you wanted to create a "physical" copy of the html output of the jsp then aaaaaa's method is your man, or if you really want to do what you asked, pass the parameters in the url and have fun parsing them with JavaScript.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Suggested Solutions

    Outlook Free & Paid Tools
    Digital marketing agencies have encountered both the opportunities and difficulties that emerge from working with a wide-ranging organizations.
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now