This week's book giveaways are in the Jython/Python and Object-Oriented programming forums. We're giving away four copies each of Machine Learning for Business: Using Amazon SageMaker and Jupyter and Object Design Style Guide and have the authors on-line! See this thread and this one for details.
We have an upload module that enable site operator to upload news in CSV format.
“NewsTitle, NewsDate, NewsDescription”
After uploading news details in database, site operator can view all uploaded news alone with the existing news. If he wants to display uploaded news on the site or want to remove any existing news from displaying, just need to check/uncheck checkbox against the particular news and database will have corresponding updates when site operator saves form.
We have JSP page that make query to database and display the news that are marked to be displayed.
We upload news end of the day.
Information displayed by JSP page is same for whole day, but still it is making query to the database. We can catch the content in application sever by many ways, but still JSP page will be rendered the each time it has new request.
If I am able to generate .html page with the content of output generated by JSP page, it will have faster for user. I can make a provision that, whenever site operator uploads news, generate new .html file with the output of JSP file and overwrite the existing.
Now my question is, how to generate .html page from the output generated by JSP page?
wharver contents JSP is generating can be written to an HTML fiel by simple I/O, you may use a servlet as well. Do embed date in the name of HTML file, so any request to JSP page will check for existance of this HTML file, if present redirect to this file, if not do DB query and generate HTML file and then redirect.
You may also want to write a small script to do clean-up of those HTML files in a regular basis. looks straight-forward to me.
Can't .... do .... plaid .... So I did this tiny ad instead:
Sauce Labs - World's Largest Continuous Testing Cloud for Websites and Mobile Apps