Posted
Filed under JSP, JAVA
[원문]http://hellogk.tistory.com/85

/**
 * Pathvariable example
 * @return
 */
@RequestMapping("/page/{var}")
public String page(@PathVariable String var){
    String returnUrl = "";
    if(var.equals("one")) {
        returnUrl = "page1";
    } else if(var.equals("two")) {
        returnUrl = "page2";
    }
    return returnUrl;
}
2015/11/18 17:46 2015/11/18 17:46
Posted
Filed under Linux
스프링의 web.xml에 utf-8 filter 를 추가 해주고도  한글이 께진다면 
tomcat 서버의 다음과 같이 설정을 해주면 한글 깨짐을 방지 할 수 있다.

/usr/local/tomcat/conf/server.xml

 <Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" URIEncoding="UTF-8"  />

2015/11/10 10:03 2015/11/10 10:03
Posted
Filed under PHP
foreach($_REQUEST as $key => $value ){
  ${"$key"} = $value;
}
2015/11/04 18:01 2015/11/04 18:01
Posted
Filed under centos7

If you receive an error while restarting IPtables on your virtual machine that includes : raw nat mangle filter [FAILED] or similar, this is a known error with CentOS 5 / CentOS 6 on virtual architectures. You simply need to modify the : /etc/init.d/iptables file.

===참고
https://www.hostvirtual.com/kb/6383/IPtables-returns-an-error--security-raw-nat-mangle-filter-FAILED.html
===

Next, locate the below text, you can search for 'setting chains' Next add the lines labeled with + to the file, after the line with: case "$i"

vi /etc/init.d/iptables

echo -n $"${IPTABLES}: Setting chains to policy $policy: "
    ret=0
    for i in $tables; do
        echo -n "$i "
        case "$i" in

<!-- 추가된 부분 -->
+           security)

+               $IPTABLES -t filter -P INPUT $policy \
+                   && $IPTABLES -t filter -P OUTPUT $policy \
+                   && $IPTABLES -t filter -P FORWARD $policy \
+                   || let ret+=1
+               ;;


            raw)
                $IPTABLES -t raw -P PREROUTING $policy \
                    && $IPTABLES -t raw -P OUTPUT $policy \
                    || let ret+=1
                ;;

2015/11/02 16:33 2015/11/02 16:33