Archive for March, 2015

Memo: complie tex with texstudio

March 17th, 2015

In texstudio, the right procedures to compile your document do this steps:

  1. compile ‘main.tex’ using latex or pdflatex
  2. compile ‘main.tex’ (NOT ‘ref.bib’) using bibtex => this step will generate main.aux file
  3. compile twice ‘main.tex’ using latex or pdflatex

Otherwise, you may find your bib list not updated or get errors like:

I couldn’t open file name `bibi.aux’


Memo: log4j in tomcat (备忘:Tomcat中配置log4j)

March 9th, 2015

In a tomcat project, we can configure log4j to write logs in a file with:
This will put all the log files in the /log dir under tomcat root dir.

Here is a full version of the sample

### direct log messages to stdout ###
# log message format: 10:48:40,399 INFO Test:36 - [3, 2, 1]
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
### direct log messages to file ###
log4j.appender.rollingFile.layout = org.apache.log4j.PatternLayout
# log message format: INFO main wp.newsbag.Test - message ...
#log4j.appender.rollingFile.layout.ConversionPattern=%p %t %c - %m%n
log4j.appender.rollingFile.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss,SSS} %5p %c:%L - %m%n
#log4j.rootLogger=debug, stdout
log4j.rootLogger=debug, rollingFile

Location of tomcat work dir in eclipse (Eclipse中tomcat工作目录)

March 9th, 2015

The default dir for eclipse to publish we apps in tomcat is WORKSPACE\.metadata\.plugins\org.eclipse.wst.server.core\tmpX, where X could be 0, 1, 2, depending on how servers you have configured. Of course, the dir can be changed as shown in the Server project, as shown in the pic below:

Configure work dir for tomcat in Eclipse


备忘:Eclipse中tomcat的默认工作目录为:WORKSPACE\.metadata\.plugins\org.eclipse.wst.server.core\tmpX,X可能为0,1,2….。当然,这个目录可以在Server Project中修改,如上图所示。