特殊文字を含むフランス語、ドイツ語などのさまざまな言語のテキストである本文パラメーターを渡しています。私はボディをエンコードするためにJavascriptのencode()を使用しています。jspページはUTF-8でエンコードされており、サーブレット側では使用してみました
request.setCharacterEncoding("UTF-8");
ただし、実際のサーブレット本体に到達する前に jboss から以下のエラーが発生します。
threw exception: java.lang.IllegalStateException: Parameters processing failed.
at org.apache.tomcat.util.http.Parameters.processParameters(Parameters.java:407) [jbossweb-7.0.13.Final.jar:]
at org.apache.tomcat.util.http.Parameters.processParameters(Parameters.java:229) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.connector.Request.parseParameters(Request.java:2874) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.connector.Request.getParameterNames(Request.java:1333) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.connector.Request.getParameterMap(Request.java:1313) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.connector.RequestFacade.getParameterMap(RequestFacade.java:422) [jbossweb-7.0.13.Final.jar:]
at org.apache.struts2.dispatcher.Dispatcher.createContextMap(Dispatcher.java:592) [struts2-core-2.3.8.jar:2.3.8]
at org.apache.struts2.dispatcher.ng.PrepareOperations.createActionContext(PrepareOperations.java:78) [struts2-core-2.3.8.jar:2.3.8]
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:78) [struts2-core-2.3.8.jar:2.3.8]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_11]
小さいテキストを渡すと機能しますが、本文が長い場合は例外がスローされます。
失敗したボディに渡された値:
K%E6re%20hr./fru%20%3Cbr%3E%3Cbr%3EVi%20bekr%E6fter%20hermed%2C%20at%20vi%20har%20modtaget%20din%20anmodning%20om%20at%20blive%20fjernet%20som%20modtager%20af%20Dells%20marketingmeddelelser%20den%20DD/MM/YYYY.%20%3Cbr%3E%3Cbr%3EVores%20marketingdatabase%20er%20blevet%20opdateret%20som%20f%F8lge%20af%20din%20anmodning.%20Der%20kan%20g%E5%20op%20til%2010%20arbejdsdage%20for%20e-mail%20og%204%20%u2013%206%20uger%20for%20direkte%20mail%2C%20f%F8r%20indstillingerne%20tr%E6der%20i%20kraft.%20Da%20nogle%20meddelelser%2C%20f.eks.%20direkte%20mail-kataloger%2C%20udvikles%20og%20s%E6ttes%20i%20k%F8%20til%20distribution%20l%E6nge%20i%20forvejen%2C%20vil%20du%20muligvis%20modtage%20flere%20oplysninger%2C%20efter%20at%20vi%20har%20modtaget%20din%20anmodning.%20%3Cbr%3E%3Cbr%3EVi%20er%20kede%20af%2C%20at%20du%20ikke%20l%E6ngere%20%F8nsker%20at%20modtage%20oplysninger%20om%20Dells%20produkter%20og%20services%2C%20men%20hvis%20du%20skulle%20ombestemme%20dig%20p%E5%20et%20senere%20tidspunkt%2C%20kan%20du%20bes%F8ge%20vores%20websted%3A%20www.dell.dk%20%3Cbr%3E%3Cbr%3EHvis%20du%20fortsat%20modtager%20marketingmeddelelser%20fra%20os%20efter%20de%20tidsrum%2C%20der%20er%20angivet%20ovenfor%2C%20er%20du%20altid%20velkommen%20til%20at%20kontakte%20os%20p%E5%20delldk@clientmail.eu.com.%20%3Cbr%3E%3Cbr%3EMed%20venlig%20hilsen%20%3Cbr%3E%3Cbr%3EDells%20kundeservice%20%3Cbr%3EDell%20Computer