Categories
- Android (3)
- Cloud Computing (4)
- Development (13)
- Linux (31)
- Uncategorized (31)
- WordPress (5)
Tags
Archives
-
Random Posts
Delicious Bookmarks
- Sending/receiving a Large size of message 2010/08/30
- Linux: How To Clear The Cache From Memory 2010/08/26
- Ejabberd-Cluster Database Configuration 2010/08/21
- How to: Find the inode size of an ext2 / ext3 filesystem 2010/08/21
- Ubuntu Router 2010/08/21
- HOWTO: Wireless Security - WPA1, WPA2, LEAP, etc. 2010/08/21
Google Reader Shares
Richard's GR ShareLinks
Meta
Monthly Archives: June 2005
UrlRewriteFilter
Based on the popular and very useful mod_rewrite for apache, UrlRewriteFilter is a Java Web Filter for any J2EE compliant web application server (such as Resin, Orion or Tomcat), which allows you to rewrite URLs before they get to your … Continue reading
Posted in Uncategorized
Leave a comment
Struts application i18n
Java 为应用程序的国际化提供了良好的支持, Struts 也继承了这一优点。通过全程使用 unicode 编码可以非常简单地实现应用的国际化。 1,全部页面声明使用 UTF-8<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 2,建立一个 filter 来过滤所有页面文件,以确保始终使用 UTF-8 来分析所有的 incoming request. 4,以 English 来编写 default 的消息资源(message resources)文件 ApplicationResources.properties (文件名可以自行在 struts-config.xml 中指定),然后再基于这个消息资源文件翻译成想要的语言。 5,以翻译成简体中文为例子。先新建一个文本文件 ApplicationResources_zh_CN_original.properties,将其中的英文翻译成中文,然后用 native2ascii 指令转换之:# native2ascii -encoding … Continue reading
Posted in Uncategorized
Leave a comment