0

The title may not be clear enough, but actually my case is quite simple.

There is a jar that gets a certain task done. Now there is servlet that calls the jar and a user can access the servlet and request the task to be done. I want to push all system.out.prints in the jar, which shows processing progress information, to the HTML page returned. Any solution? Thanks!

4

1 回答 1

3

看看System.setOut(PrintStream)。您可以将输出流设置为 servlet 的输出流。然后,任何进一步的引用System.out实际上都会引用您的 HTML。

于 2013-05-01T02:44:09.863 回答