jsp错误提示
jsp代码
<html><head><title>using jsp:setProperty</title></head><body><table border="1" align="center"> <tr><th class="title"> using jsp:setProperty</table><jsp:useBean id="entry" class="bean.SaleEntry"></jsp:useBean><jsp:setProperty property="itemID" name="entry" value='<%=request.getParameter("itemID") %>'/><jsp:setProperty property="numItems" name="entry" value='<%=request.getParameter("numItems") %>'/><jsp:setProperty property="discountcode" name="entry" value='<%=request.getParameter("discountcode") %>'/><br/><table border="1" align="center"> <tr class="colored"><th>Item ID</th><th>unit price</th><th>number ordered</th><th>total price</th></tr> <tr align="right"> <td><jsp:getProperty name="entry" property="itemID" /></td> <td><jsp:getProperty name="entry" property="itemCost"/></td> <td><jsp:getProperty property="numItems" name="entry"/> </td> <td><jsp:getProperty property="totalCost" name="entry"/></td> </tr></table></body></html>
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:417)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause
org.apache.jasper.JasperException: java.lang.IllegalArgumentException
org.apache.jasper.runtime.JspRuntimeLibrary.handleSetProperty(JspRuntimeLibrary.java:667)
org.apache.jsp.SaleEntry_jsp._jspService(SaleEntry_jsp.java:76)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause
java.lang.IllegalArgumentException
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.apache.jasper.runtime.JspRuntimeLibrary.handleSetProperty(JspRuntimeLibrary.java:665)
org.apache.jsp.SaleEntry_jsp._jspService(SaleEntry_jsp.java:76)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.13 logs.
--------------------------------------------
Apache Tomcat/6.0.13
------------
要怎么解决非法参数的问题?
[解决办法]