Learning Stuts in your own experience is experienced after a problem.

xiaoxiao2021-03-06  60

When configuring log4j,

< Param name = "file" value = "c: /strutstest.log" />

The path cannot be written into c: Strutstest.log Is used to filter LOG, only the debug log in the file. without because of the LOG that avoids Struts Hit in the file. When Server is server, let Web.xml take your own Selvet, action src.java.app.pjActionServlet read log4j : String path = getServletconfig (). GetInitParameter ("config-path"); if (path! = Null&&! Path.equals (")) {configdir = path;} configdir = getServletContext (). GetRealPath (configdir); Domconfigurator.configure (Concatpath (ConfigDir, "Log4j.xml)); there is no problem with Ant's use. When using the Validate plug-in, from WOM must inherit the ValidatorForm, don't know why ValidatorActionForm is not.

转载请注明原文地址:https://www.9cbs.com/read-83742.html

New Post(0)