2005/08/30
2005/08/25
[troubleshooting] Resolve Too Many Open Files
Resolve Too Many Open Files
Troubleshooting Guidance Support Diagnostic Patterns
之前一直發現rlim_fd_max這個值始終都是預設的1024這個值,並不是user設定後的值,原來是在啟動的時候,他會去跑commEvn.sh裡頭的resetFd()這個function,裡頭會把值還原成1024,把它comment掉就好了。
Troubleshooting Guidance Support Diagnostic Patterns
之前一直發現rlim_fd_max這個值始終都是預設的1024這個值,並不是user設定後的值,原來是在啟動的時候,他會去跑commEvn.sh裡頭的resetFd()這個function,裡頭會把值還原成1024,把它comment掉就好了。
[troubleshooting] WLS 8.1 亂碼解決方法
http://www.ddvip.net/program/java/index6/281.htm
in web.xml add:
<context-param>
<param-name>weblogic.httpd.inputCharset./*</param-name>
<param-value>BIG5</param-value>
</context-param>
in weblogic.xml add:
<jsp-descriptor>
<jsp-param>
<param-name>compileCommand</param-name>
<param-value>javac</param-value>
</jsp-param>
<jsp-param>
<param-name>compilerSupportsEncoding</param-name>
<param-value>true</param-value>
</jsp-param>
<jsp-param>
<param-name>encoding</param-name>
<param-value>BIG5</param-value>
</jsp-param>
</jsp-descriptor>
in web.xml add:
<context-param>
<param-name>weblogic.httpd.inputCharset./*</param-name>
<param-value>BIG5</param-value>
</context-param>
in weblogic.xml add:
<jsp-descriptor>
<jsp-param>
<param-name>compileCommand</param-name>
<param-value>javac</param-value>
</jsp-param>
<jsp-param>
<param-name>compilerSupportsEncoding</param-name>
<param-value>true</param-value>
</jsp-param>
<jsp-param>
<param-name>encoding</param-name>
<param-value>BIG5</param-value>
</jsp-param>
</jsp-descriptor>
2005/08/15
Smartly load your properties
Link
Example
Assume I have a property file which named config, and this file locate at src/albert.
This file contains two values:
name=albert
email=junyuo@gmail.com
Then you can utilize this approach to read this property file
InputStream is = ClassLoader.getSystemClassLoader().getResourceAsStream("albert/config.properties");
PropertyResourceBundle rb = new PropertyResourceBundle(is);
System.out.println("name="+rb.getString("name"));
System.out.println("email="+rb.getString("email"));
Example
Assume I have a property file which named config, and this file locate at src/albert.
This file contains two values:
name=albert
email=junyuo@gmail.com
Then you can utilize this approach to read this property file
InputStream is = ClassLoader.getSystemClassLoader().getResourceAsStream("albert/config.properties");
PropertyResourceBundle rb = new PropertyResourceBundle(is);
System.out.println("name="+rb.getString("name"));
System.out.println("email="+rb.getString("email"));
2005/08/02
Subscribe to:
Posts (Atom)