哪你这样试试:
return mapping.findForward("/项目名称/adminQueryPlate.do");
或:
return mapping.findForward("/adminQueryPlate.do");
现在我又碰到一个jsp页面跳转的问题?
从一个下拉列表中选择一项,然后把值通过onChange="show(传的值);"再提交到一个Action处理。
[CODE]function show(param)
{
var p=parseInt(param);
location.href="refreshSelectPlate.do?plateId=p"
}[/CODE]
我解决不了的是:页面跳转时报错,
[CODE]javax.servlet.ServletException: For input string: "p"
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:545)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:486)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
java.lang.NumberFormatException: For input string: "p"
java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
java.lang.Integer.parseInt(Integer.java:447)
java.lang.Integer.parseInt(Integer.java:497)
com.yourcompany.struts.action.RefreshSelectPlateAction.execute(RefreshSelectPlateAction.java:43)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)[/CODE]
我能确定的是传的那个参数 p 不是数字,而且非常肯定,从下拉列表传递的值是正确的
因为我把p换掉就完全正常了 例如:location.href="refreshSelectPlate.do?plateId=3"
怎么能把它转化为数字呢?真是晕死 在线等!
[此贴子已经被作者于2007-8-23 12:40:08编辑过]