Tuesday, March 13, 2012

How do I submit a Chinese characters in Struts?


The Chinese characters "UTF-8" encoding not able to work with the above code. The magic trick is on the "TilesRequestProcessor", change
< controller processorClass="org.apache.struts.tiles.TilesRequestProcessor" / >
to
< controller processorClass="com.fabiolee.struts.tiles.RequestProcessor" / >
in the "struts-config.xml" and add in the below class "RequestProcessor.java".

Then it will work nicely.