原创 java ftps test
class JavaTest { public static void main(String[] args) { ByteArrayOutputStream Log = new ByteArrayOutputStream();
原创 屏蔽超鏈接跳轉事件
href="javascript:void(0);"
原创 dump JVM 內存
1. 手動dump /root/jdk1.6.0_23/bin/jmap -dump:file=/root/dump/dump3.hprof <進程ID> 2. JVM OME時自動dump -XX:+HeapDumpOnOutOfMe
原创 tomcat6配置ssl雙向認證
步驟如下 1、生成服務器端證書 keytool -genkey -keyalg RSA -dname "cn=localhost,ou=sango,o=none,l=china,st=beijing,c=cn" -alias server
原创 tomcat配置pkcs12證書
導出證書keytool -import -trustcacerts -file ca.crt -keystore server.public -keypass 123456 -storepass 123456 -alias certkey
原创 js驗證
//檢查年齡function isAge(str){ var mydate=new Date; var now=mydate.getFullYear(); if (str < now-60 || str > now-18){ retur
原创 Tomcat環境中,內存異常的解決辦法
導致原因:SUN的JVM的PermSize默認值太小,導致了java.lang.OutOfMemoryError: PermGen space異常。 解決辦法:1. 使用帶有腳本的Tomcat。2. 如果系統已經運行安裝過tomcat
原创 jsp跳轉頁面
1. RequestDispatcher.forward()在服務器端起作用,當使用forward()時,Servlet engine傳遞HTTP請求從當前的Servlet或者是JSP到另外的一個Servlet、JSP 或普通HTML文
原创 shell 字符串截取
第一種方法: ${varible##*string} 從左向右截取最後一個string後的字符串 ${varible#*string}從左向右截取第
原创 bash if
if [ condition ] then action fi 注意:“if”和“[”之間需要空格,如果你不空格,shell會報告語法錯誤的。我就被這個浪費了好一陣時間 conditon測試類型對照表 運算符 描述 示例 文件
原创 tomcat配置host
<Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceA
原创 web.xml中配置http訪問轉向https
<login-config> <auth-method>CLIENT-CERT</auth-method> <realm-name>Client Cert Users-only Area</realm-name> </log
原创 設置瀏覽器收藏欄圖標(SHORTCUT ICON)
<LINK REL="SHORTCUT ICON" HREF="images/fav_16x16.ico">
原创 windows下製作特定大小文件
fsutil file createnew test4 2146000000fsutil file createnew test1 10485760 1048576(1024*1024)fsutil file createnew test
原创 ibatis防止動態列錯誤
添加配置 remapResults="true"