当前位置: 代码迷 >> Java Web开发 >> Struts1.X 中 LookupDispatchAction 中文按钮 有关问题
  详细解决方案

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

热度:928   发布时间:2016-04-17 01:29:37.0
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>
  相关解决方案