Parse XML sample code using jquery and jqueryxml sample code
Xml file structure: books. xml
Page code:
:
How to Use jquery to add, delete, modify, and delete xml files
You can clearly
'. ' Yyyy-mm-dd
This is the default value, which scrolls every day at midnight
'. ' Yyyy-mm-dd-a
Scroll every day at midnight and noon
'. ' Yyyy-mm-dd-hh
Scroll in every one hours
'. ' Yyyy-mm-dd-hh-mm
Rolling in every Minute
'. ' Yyyy-ww
The first day of the week depending on the regional setting is scrolled
The following is a sample config
When deploying two or more projects under Tomcat, it is best to define the Webapprootkey parameter in the Web. xml file and, if undefined, default to "Webapp.root", as follows: Application Path - Context-param> Param-name>WebapprootkeyParam-name> Param-value>Webapp.rootParam-value> Context-param> Best newspaper The parameter values for each item are different to avoid conflict
Transferred from: http://blog.csdn.net/arvin_qx/article/details/6829873When deploying two or more projects under Tomcat, it is best to define the Webapprootkey parameter in the Web. xml file and, if undefined, default to "Webapp.root", as follows:It is best to ensure that the parameter values for each item are different to avoid conflicting items:Web App root system property already set to different value:
When deploying two or more projects under Tomcat, it is best to define the Webapprootkey parameter in the Web. xml file, which, if undefined, defaults to "Webapp.root", as follows:
Best newspaper The parameter values for each item are different to avoid conflicting items
Severity: Exception sending context initialized event to listener instance of class Org.springframework.web.util.Log4jConfigLis TenerJava
, thread, category, etc.) of the logConfiguration mode:Log4j.appender.appenderName.layout =classnameLog4j.appender.appenderName.layout.Option1 = value1...Log4j.appender.appenderName.layout.OptionN = ValuenSecond, configuration detailedIn the actual application, in order to make the log4j run in the system, the configuration file must be set beforehand. The configuration
());// Initialize global variablesPublic void init () throws ServletException {// Use web. xml to Dynamically Retrieve the configuration fileString prefix = getServletContext (). getRealPath ("/");String file = getInitParameter ("log4j-init-file ");// If the corresponding configuration
(log4jlocation )){ Propertyconfigurator. Configure (root + log4jlocation ); } } } 2. Load the servlet in Web. xml 3. The relative path can be used in log4j. properties as follows: # Rlogfile Log4j. appender. rlogfile = org. Apache. log4j. rollingfileappender
The log4j configuration file (Configuration file) is used to set the level, the repository, and the layout of the logger, and it can be set in key=value format or in XML format information. By configuring, you can create a log4j running environment. The
In the whole web system, in order to unify the use of log management, it is necessary to load the log4j configuration file when the system is started, in order to ensure that the format of the later use of log4j is consistent, easy to track and solve the problem. So, how to load the log4j configuration
Xml| sample
I. OverviewThere are many ways to parse XML documents, and there are a number of toolkits available, and here is the digester from Apache Jakarta, which is very handy for parsing XML files without the need to be overly concerned with the underlying concrete parsing process.Digester first appeared in struts,
has been successfully installed.
Mylog4j. Properties
### direct log messages to stdout ###log4j.appender.consoleout=org.apache.log4j.ConsoleAppenderlog4j.appender.consoleout.layout=org.apache.log4j.PatternLayoutlog4j.appender.consoleout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSS} %5p %c:%L - %m%n### direct messages to file myfile.log ###log4j.appender.myfile=org.apache.log4j.DailyRollingFileAppenderlog4j.appender.myfile.File=logs/m
The log4j configuration file is used to set the level, the repository, and the layout of the logger, which can be set in key=value format or in XML format.By configuration, you can create a running environment for log4j.1. The basic format of the configuration file
Source: http://www.coderli.com/log4j-console-file-garbled A small problem, but it makes me feel that there are few people who really move their brains. Let me talk about it. Today encountered a small problem, log4j output to file garbled, the console is normal. Obviously the coding problem leads to. Google a search, al
profile path.
Set Value VM System variables:Simply, by setting the value of the VM system variable log4j.configuration to the configuration file path before getting the Logmanager initialization value, you can achieve the purpose:
static {
String Customizedpath = "Log/log4j.xml";
System.setproperty ("Log4j.configuration", Customizedpath);
Logger = Logmanager.getlogger (Log4jonetest.class);
}
propertyconfigurator or Domconfigurator:Domcon
Label:1. log4j Print SQL to tune the log level to debug, the SQL will be displayedLog4j.rootlogger=info,consoleConsoleLog4j.appender.console=org.apache.log4j.consoleappenderLog4j.appender.console.layout=org.apache.log4j.patternlayoutlog4j.appender.console.layout.conversionpattern=%d [%t]%-5p [%c]-%m%n Log4j.logger.java.sql.resultset=debug#log4j. Logger.org.apache=infoLog4j.logger.java.sql.connection=debugL
. XML in a directory similar to the followingFind out if the following statement is available org.springframework.web.util.log4jconfiglistener NBSP; org.springframework.web.context.contextloaderlistener If there is, first check whether the statement is complete, the monitoring and declaration order can not be reversed, otherwise it will error; second, look at the code where the address is not wrong, the addr
log4j.properties.
So the error log is saved in the LogRecorderror.log file,
But because: DEBUG
Log4j.appender.d.threshold = Info This sentenceThe function is to output content above the info level to LogRecord.log, so the LogRecord.log file contains the error level file.
If there is any mistake, please point out, thank you.
Monday came back to find the above
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.