开发者

Display dynamic html pages in browser 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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜