| 1 | {{{ |
| 2 | #!html |
| 3 | <div style="text-align: center; color:#151B8D"><big style="font-weight: bold;"><big><big> |
| 4 | JSP 支援多國語系 |
| 5 | </big></big></big></div> <div style="text-align: center; color:#7E2217"><big style="font-weight: bold;"><big> |
| 6 | Tomcat + JSP + i18n + taglib |
| 7 | </big></big></div> |
| 8 | }}} |
| 9 | [[PageOutline]] |
| 10 | |
| 11 | = 環境 = |
| 12 | * sun java jdk 6 |
| 13 | * tomcat 6 |
| 14 | = 使用 Eclipse 開發 = |
| 15 | |
| 16 | |
| 17 | web.xml |
| 18 | |
| 19 | {{{ |
| 20 | #!xml |
| 21 | <?xml version="1.0" encoding="UTF-8"?> |
| 22 | <!DOCTYPE web-app |
| 23 | PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" |
| 24 | "http://java.sun.com/dtd/web-app_2_3.dtd"> |
| 25 | <web-app> |
| 26 | <display-name>i18n</display-name> |
| 27 | <welcome-file-list> |
| 28 | <welcome-file>index.html</welcome-file> |
| 29 | <welcome-file>index.htm</welcome-file> |
| 30 | <welcome-file>index.jsp</welcome-file> |
| 31 | </welcome-file-list> |
| 32 | <taglib> |
| 33 | <taglib-uri>http://jakarta.apache.org/taglibs/i18n-1.0</taglib-uri> |
| 34 | <taglib-location>/WEB-INF/taglibs-i18n.tld</taglib-location> |
| 35 | </taglib> |
| 36 | |
| 37 | </web-app> |
| 38 | |
| 39 | }}} |