博文

目前显示的是 一月, 2014的博文

Install git on windows and use it in cygwin

You have two options when install git: Install mysisgit https://code.google.com/p/msysgit/downloads/list Install git from cygwin Recommendation is to use option 1, because by that you always get the latest git version.  After install mysisgit on your windows machine, you should add git_install_folder/bin/ to your path environment variable so that cygwin can find it. Add the following configuration settings from cygwin: git config --global core.askpass "git-gui–-askpass" git config --global credential.helper store git config --global core.eol lf git config --global core.autocrlf false git config --global core.filemode false // ignore file mode(chmod) change in git

Install Oracle Java 7 on Ubuntu 12.04

This tested to be working: http://www.liberiangeek.net/2012/04/install-oracle-java-jdk-7-in-ubuntu-12-04-precise-pangolin/

Escaping in JSP for JSP and JS

Escaping for JSP A JSP page will eventually rendered as HTML content in browser. In that case, lots of character like <, &, > need to be escaped before directly display them on the HTML page. This is when we need the escape for xml for html for JPS page. To escape, you could use this in JSP page <%@taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> ${fn:escapeXml(myString)} or <c:out value="${myString}"/> Escaping for Javascript Sometimes in JSP page we write Javascript code. The javascript code has its own understand of character like single quote ' and double quote ", this is when we need escape in JSP but for the javascript usage. The best way to do that is create a utility tag libary <?xml version="1.0" encoding="UTF-8" ?> <taglib xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation...