开发者

Display dynamic html pages in browser using jsp/servlet

开发者 https://www.devze.com 2023-03-05 21:45 出处:网络
I want to display html files dynamically (last modified at t开发者_如何学JAVAhe top) using JSP/Servlet.

I want to display html files dynamically (last modified at t开发者_如何学JAVAhe top) using JSP/Servlet. Please help me .


  • You will have list of file in your DIR. so using listFiles() retrieve all files.

  • Take them in Collection.

  • Implement a Comparator and use lastModified() to compare and sort . and take first n files and display

  • Put this logic in service classes and call them from servlet

0

精彩评论

暂无评论...
验证码 换一张
取 消