เข้าไปอ่าน http://wiki.apache.org/tapestry/Tapestry5Utf8Encoding มา พยายามจะแก้ตามเขาหละ แต่ว่าแก้แล้ว Eclipse เตือนว่ามี Error ที่
requestGlobals.getHTTPServletRequest().setCharacterEncoding("UTF-8");
ประมาณว่าเกี่ยวกับ HTTPServletRequest หลังจากที่ตามหาอยู่พักใหญ่ก็เลยคิดว่าต้องลง servlet-api ซึ่งทำได้ไม่ยากแก้ pom.xml นิดหน่อย เดี๋ยว Maven ลงให้เอง
--- pom.xml.old 2007-06-10 18:30:49.000000000 +0200
+++ pom.xml 2007-06-10 17:51:27.000000000 +0200
@@ -24,6 +24,14 @@
<version>1.2.9</version>
</dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.4</version>
+ </dependency>
+
+
+
<!-- A dependency on either JUnit or TestNG is required, or the surefire plugin (which runs the tests)
will fail, preventing Maven from packaging the WAR. Tapestry includes a large number
of testing facilities designed for use with TestNG (http://testng.org/), so it's recommended. -->
หลังจากสั่ง mvn compile แล้ว mvn ก็ download มาลงให้เลย
ป.ล. ช่วงนี้งงๆ ใช้ Maven บ้าง Subversion บ้างสั่ง svn compile เฉย :-P
ตัว Tapestry เป็นframework เหมือนพวก struct ไหมครับ..
ยังไม่เคยลองใช้ framework ใน java เลยครับ แต่เคย
ได้ยินว่า struct เป็น framework ตัวหนึ่ง - -
กรณี servlet api ปกติ เรามักจะใส่ scope = compile ลงไปใน dependency ด้วย
เพื่อบอกให้รู้ว่า ใช้เฉพาะตอน compile ไม่ต้อง pack ใส่ war เวลา deploy
compile
pphetra: พี่ pok ตามมาอ่านด้วย ขอบคุณครับ
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<scope>compile</scope>
</dependency>
ผมแก้แล้วหน้าตาแบบนี้ (สงสัยต้องลองทำ war ตรงคำตอบดู)