可以将任意文件的内容流式传输到浏览器的Java Web应用程序(活尾) [英] Java web application that can stream the content of an arbitrary file to the browser (live tail)

查看:388
本文介绍了可以将任意文件的内容流式传输到浏览器的Java Web应用程序(活尾)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在网上搜索一个Java Web应用程序,可以用来拖尾文件系统上的任意文件。最重要的要求是让应用程序回流文件更改,这样我就不必刷新(就像你可以用node.js轻松做的事情)。

I have been searching the web for a while for a Java web application that can be used to "tail" on any arbitrary file on the file system. The most important requirement would be to have the app to stream back the file changes so that I don't have to refresh (like the stuff you can easily do with node.js).

我可以自己快速写一个,但流媒体要求不是微不足道的。此外,应用程序应该可以部署在Java应用程序服务器中。

I can quickly write one myself but the streaming requirement is not trivial. Also, the app should be deployable in a Java app server.

任何指针?

谢谢

推荐答案

好的,所以我跟着@Liv建议,我自己构建了这个东西。
这是几个小时的编码成果,所以不要期望太多。

Ok, so I followed @Liv suggestion and I have built the thing myself. It's the fruit of a couple of hours of coding, so don't expect much.

我已经在Tomcat和Jetty上测试了它。查看自述文件。

I have tested it on Tomcat and Jetty. Check out the README file.

https://github.com/aestasit/logviewer

这篇关于可以将任意文件的内容流式传输到浏览器的Java Web应用程序(活尾)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆