2015年2月24日 星期二

LOG4j Simple start and slf4j start


Log4j 

1. Log4j setting explaination Good ExplainationOverview2

2. Example code Simple Example


For Setting in tomcat discussion
Stackup
apache office
Discussion2
Non-web

Slf4j Start

1. Overview ,  overview 2
2. It need the dependence of
  • slf4j-api-1.7.2.jar
  • slf4j-simple
  • logback-classic
  • logback-core
3.If you using log4j in the after you should setting in run command
-Dlog4j.configuration="/home/Andy/workspace/ShiroSource/WebContent/WEB-INF/log4j.properties"





Complete the slf4j and log4j in apache shiro

Summary File



From here

a. Library using 



b.  log4j.properties file  and put in the WEB-INF/






c. Setting the web.xml


d. Create web context listen at web start to load property files






2015年2月23日 星期一

Eclipse Add javax library




Using Eclipse:
  1. Right click your project folder, select Properties at the bottom of the context menu.
  2. Select "Java Build Path"
  3. Click Libraries" tab
  4. Click "Add Library..." button on right (about halfway down)
  5. Select "Server Runtime" click "Next"
  6. Select your Tomcat version from the list
  7. Click Finish

Reference from forumla