顯示具有 Tomcat 標籤的文章。 顯示所有文章
顯示具有 Tomcat 標籤的文章。 顯示所有文章

2016年10月20日 星期四

[Tomcat]解決 tomcat 無法進入 Server Status / Manager App / Host Manager 的狀況

[Tomcat]解決 tomcat 無法進入 Server Status / Manager App / Host Manager 的狀況

修改 tomcat-users.xml 的資訊,位於Tomcat安裝目錄下的conf目錄中
將相關 rolename 及 user 資訊加入
修改範例如下

2013年8月23日 星期五

【轉貼】Tomcat與UTF-8編碼

由於Tomcat預設的編碼為ISO-8859-1,所以當使用Tomcat架設JSP與Mysql資料庫時
,便要注意中文編碼的問題。最好的方法就是把 Tomcat、web與Mysql全部的編碼一
律設定為UTF-8,下面將說明如何將Tomcat的編碼處理設定為UTF-8。

1. GET請求部份
Tomcat使用ISO-8859-1編碼作為預設的URL編碼,所以當web發出夾帶中文訊息的
get請求時,資料就會變成亂碼。

解決方法是修改\Tomcat\conf\server.xml檔案,找到Connector標籤,加入
URIEncoding="UTF-8"即可。
========
Connector port="8080" protocol="HTTP/1.1"
 URIEncoding="UTF-8"
 connectionTimeout="20000"
 redirectPort="8443"
========= 

【FROM】http://roymercadian.blogspot.tw/2012/12/tomcatutf-8.html
【FROM】http://overinfinityresearch.blogspot.tw/2007/10/tomcat6-servletget.html

2013年7月7日 星期日

在Eclipse中讓Tomcat可以每次都更新靜態檔案如*.html..等

在Eclipse中讓Tomcat可以每次都更新靜態檔案如*.html..等
不需要重新部屬...
第一種方法是在Tomcat啟動前加入參數
Disabling caching in Tapestry
It is troublesome to reload the application before each test run. To solve the first part of the problem, you can tell
Tapestry to not to cache HTML and .page files. To do that, you need to set a JVM system property
26 Chapter 1 Getting Started with Tapestry
org.apache.tapestry.disable-caching to true. If you were starting the JVM yourself, you would run it like:
java -Dorg.apache.tapestry.disable-caching=true ...
However, as the JVM is started by Tomcat, you need to setup a environment variable JAVA_OPTS before running
startup.bat:
Now, you can change say Home.html and the change will take effect immediately.