首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Web开发 >

Struts1.X 中 LookupDispatchAction 中文按钮 有关问题

2012-02-04 
Struts1.X 中 LookupDispatchAction 中文按钮 问题Java code我的JSP页面编码是GBK%@ page languagejava

Struts1.X 中 LookupDispatchAction 中文按钮 问题

Java code
我的JSP页面编码是GBK<%@ page language="java" contentType="text/html; charset=GBK" pageEncoding="GBK"%><meta http-equiv="Content-Type" content="text/html; charset=GBK">我的ApplicationResources_zh.properties是用native2ascii的GBK编码转的Action使用的是LookupDispatchAction我用英文的ApplicationResources,程序运行没问题,一旦我用了ApplicationResources_zh就出现下面的问题,感觉是编码的问题,请问怎么解决阿。。2008-10-7 5:33:16 org.apache.struts.action.RequestProcessor processException警告: Unhandled Exception thrown: class javax.servlet.ServletException2008-10-7 5:33:16 org.apache.catalina.core.StandardWrapperValve invoke严重: Servlet.service() for servlet action threw exceptionjavax.servlet.ServletException: Action[/control] missing resource '°???????' in key method map    at org.apache.struts.actions.LookupDispatchAction.getLookupMapName(LookupDispatchAction.java:240)    at org.apache.struts.actions.LookupDispatchAction.getMethodName(LookupDispatchAction.java:281)    at org.apache.struts.actions.LookupDispatchAction.execute(LookupDispatchAction.java:158)    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)    at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)    at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)    at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)    at java.lang.Thread.run(Unknown Source)还有个奇怪的现象,只要不是用LookupDispatchAction处理的中文按钮都正常而且没出错的时候 浏览器的编码自动选者的时GB2312而出错的时候   浏览器选者的UTF-8希望各位关注下 ,谢谢


[解决办法]
引用楼主 xiangfeidecainiao 的帖子:
我的ApplicationResources_zh.properties是用native2ascii的GBK编码转的

[解决办法]
没用过 帮顶!
[解决办法]
javax.servlet.ServletException: Action[/control] missing resource '°???????' in key method map


这个是怎么回事呢?
[解决办法]
<input type=submit name="action" value="提交" onclick="this.value ='genxin';return true;"/>



<input type=submit name="action" onclick="this.value ='genxin';return true;"><bean:write property="com.submit"/></input>



[解决办法]
帮你顶下..没遇到过这类问题...如果英文正常.那么问题就出在中文资源文件里面。。
应该是转码时的问题吧
我一般都没有这样转码。偷懒。用的是一个插件..
[解决办法]
[color=#FFFFFF][/color]
[解决办法]
charset=GBK
楼主把编码都改成gb2312试试吧,在文件的属性中,编码也改成gb2312试试
[解决办法]
看看这里的配置吧
http://www.blogjava.net/web/archive/2006/07/20/lookupdispatchaction_zh.html

热点排行