简体   繁体   English

Glassfish 登录 JSF 页面

[英]Glassfish logs on JSF Page

I have JSF with Richfaces app on Glassfish server.我在 Glassfish 服务器上有带有 Richfaces 应用程序的 JSF。 Is it possible to make an ajax window on the page and show info from Glassfish's log file that is located in [GlassfishFolder]/domains/domain1/logs/server.log?是否可以在页面上创建一个 ajax 窗口并显示位于 [GlassfishFolder]/domains/domain1/logs/server.log 中的 Glassfish 日志文件中的信息? And also I want to clean up that log to make it look like in NetBeans.而且我还想清理该日志以使其看起来像在 NetBeans 中。 Thanks谢谢

Yes,是的,

Create a commandLink创建命令链接

<a4j:commandLink action="#{Bean.method}" reRender="output" />

Create output to view server.log contents创建输出以查看 server.log 内容

<h:outputText id="output" value="#{Bean.logcontent}" />

Bean.method pulls the contents of server.log ( see java file io ) and stores it in the logcontent variable. Bean.method 拉取 server.log 的内容( 参见 java 文件 io )并将其存储在 logcontent 变量中。 When output is re-rendered it will display the server.log file.重新渲染输出时,它将显示 server.log 文件。

You can manipulate logcontent in your Bean to make the output look however you wish.您可以在 Bean 中操作 logcontent 以使输出看起来像您希望的那样。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM