java - I am not using freemarker for struts2, but I see lots of logging generated by freemarker -
i using struts 2 , jsp web application, seeing lot of freemarker debugging message generated on console.
i have turn off logging using slf4j , log4j2 configurations. however, looking deeper configurations.
it seems freemarker included in struts-default package, , extending it, include freemarker support in web application well.
did misconfigure struts.xml configuration? disabling output console way go?
how "remove" freemarker application?
my struts.xml
<package name="test" namespace="/" extends="struts-default">
struts-default.xml
<package name="struts-default" abstract="true" strict-method-invocation="true"> <result-types> <result-type name="chain" class="com.opensymphony.xwork2.actionchainresult"/> <result-type name="dispatcher" class="org.apache.struts2.result.servletdispatcherresult" default="true"/> <result-type name="freemarker" class="org.apache.struts2.views.freemarker.freemarkerresult"/> <result-type name="httpheader" class="org.apache.struts2.result.httpheaderresult"/> <result-type name="redirect" class="org.apache.struts2.result.servletredirectresult"/> <result-type name="redirectaction" class="org.apache.struts2.result.servletactionredirectresult"/> <result-type name="stream" class="org.apache.struts2.result.streamresult"/> <result-type name="velocity" class="org.apache.struts2.result.velocityresult"/> <result-type name="xslt" class="org.apache.struts2.views.xslt.xsltresult"/> <result-type name="plaintext" class="org.apache.struts2.result.plaintextresult" /> <result-type name="postback" class="org.apache.struts2.result.postbackresult" /> </result-types>
struts2 uses themes generate code struts tags;
theme collection of templates (one each tag);
templates (in struts2-core-xxx.jar -> template) freemarker templates.
then not using freemarker directly (for example in place of jsps), struts2 uses freemarker implicitly, , cannot remove it.
xy: logging-pollution problem can resolved raising server level error, , application debug, instead of having whole server debug.
Comments
Post a Comment