小技巧+apache的下載地址

1:在jsp中獲取服務器的版本信息
<%= application.getServerInfo() %>
2:javascript在jap中提交待中文的參數,在後臺取得爲亂碼,解決方法
jsp代碼
document.forms[0].action = "updateUsers.do?editUTxt=" + encodeURI(editUTxt) ;//post提交

java代碼
String tempEditUTxt = request.getParameter("editUTxt");
System.out.println(tempEditUTxt );
try { System.out.println(java.net.URLDecoder.decode(tempEditUTxt ,"UTF-8"));
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
3.tomcat增加用戶tomcat-users.xml文件增加
<role rolename="manager"/>
<user username="tomcat" password="" roles="manager"/>
4.apache的下載地址
http://www.apache.org/dist
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章