参数传递问题
我想通过以下语句传递一个参数到一个Action中,并在Action中得到它,但是遇到了问题,让我不知怎么办,很郁闷啊!<html:link action="/deleteforumAction.do?postTime=<%=ff.getPostTime() %>">删除</html:link>
通过以下语句得到参数,但得到的是个空值还抛出了异常:
String postTime=request.getParameter("postTime");
错误提示:
2008-4-17 8:19:54 org.apache.tomcat.util.http.Parameters processParameters
警告: Parameters: Character decoding failed. Parameter skipped.
isHexDigit
at org.apache.tomcat.util.buf.UDecoder.convert(UDecoder.java:88)
at org.apache.tomcat.util.buf.UDecoder.convert(UDecoder.java:49)
at org.apache.tomcat.util.http.Parameters.urlDecode(Parameters.java:412)
at org.apache.tomcat.util.http.Parameters.processParameters(Parameters.java:394)
at org.apache.tomcat.util.http.Parameters.processParameters(Parameters.java:510)
at org.apache.tomcat.util.http.Parameters.handleQueryParameters(Parameters.java:267)
at org.apache.catalina.connector.Request.parseParameters(Request.java:2441)
at org.apache.catalina.connector.Request.getParameter(Request.java:1040)
at org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade.java:355)
at com.yourcompany.BBS.action.DeleteForumAction.execute(DeleteForumAction.java:23)
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:1194)
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:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at unit.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:26)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
希望大家帮我看看!谢谢!