jianyu's blog
Config maven to use socks proxy
This is not listed on maven official documents, I took several days to find a solution:
Create below environment viarible
set MAVEN_OPTS=-DsocksProxyHost=yourSocksProxyHost -DsocksProxyPort=yourSocksProxyPort
Add custom spring securtiy expression method
There are no offcial ways to add custom security expression, like hasRole / hasAuthority etc, the only way is to do some tweaking.
Solution 1. Create a static method and invoke by spel. Like below:
<security:authorize access="T(com.Class).doSomething(request.parameterMap['parameterName'], 'ROLE_ADMIN')">
python, xpath and ElementTree
Failed to find a xpath solution in python2.6 standard library. Seems like ElementTree is the only API have limited xpath support. But...
http://effbot.org/zone/element-xpath.htm
http://codespeak.net/pipermail/lxml-dev/2006-May/001294.html
And for my test code:
deps = tree.findall("//dependency[@testP='testV']")
print deps
Error:
SyntaxError: expected path separator ([)
Also Find:
phpmyadmin, nginx, ssl and https
Several problems resolved:
1. Jump to http 80 after login, not https.
2. Jump to https://test.com/index.php, not https://test.com/phpmyadmin/index.php after login.
3. Static content location.
Below is my sample configuration:
Seam, JPA & Resin
These days I am transportting some seam-jpa based web applications from jboss to resin. But found there is a bug for seam to create EntityManagerFactory in resin:
[19:34:46.510]org.jboss.seam.InstantiationException: Could not instantiate Seam
component: application_form_Database
[19:34:46.510] at org.jboss.seam.Component.newInstance(Component.java:2144)
[19:34:46.510] at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304)
...
Selenium-RC and https certification
It realy waste me several days to find a way to test our https application. Each time I start it manually I must add an exception of certificatioin into firefox, so it can't be ran in an automated test system. Until I found this:
http://townx.org/blog/elliot/dealing-self-signed-ssl-certificates-when-r...
Just in case of lost this article, I copied the solution here:
By default selinux will decline system services to read unknow files, and it will cause apache can't enalbe mod_jk, the solution is:
------------------------------------------------------------------
/etc/rc3.d/S15httpd -------->
Reading THE EVOLUTION OF PHYSICS
THE EVOLUTION OF PHYSICS
( ALBERT EINSTEIN )
THE PHILOSOPHICAL BACKGROUND P.55