去了tax还是不行啊,在\examples里运行时显示: Error: 500 Location: /examples/bean.jsp Internal Servlet Error:org.apache.jasper.JasperException: Cannot find any information on property 'Rate' in a bean of type 'tax.TaxRate' at org.apache.jasper.runtime.JspRuntimeLibrary.getReadMethod(JspRuntimeLibrary.java:619)... 我把Rate已经改成rate了,怎么还说"Rate"呢? 另外我自己建了个虚拟目录运行时显示: Error: 500 Location: /wangf/bean.jsp Internal Servlet Error:org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated. E:\tomcat\work\localhost_8080%2Fwangf\_0002fbean_0002ejspbean_jsp_0.java:89: Invalid character in input. ?? ^ E:\tomcat\work\localhost_8080%2Fwangf\_0002fbean_0002ejspbean_jsp_0.java:89: Invalid character in input. ?? ^ 2 errors, 1 warning at org.apache.jasper.compiler.Compiler.compile(Compiler.java:247)... 怎么错误不同呢?另外自己建目录后,classpath要不要加入新的路径?
刚学jsp,感觉查错功能比asp差多了,对问题根本得不到任何有用信息,这以后要学的好郁闷啊。
这样试试:<%=taxbean.getRate();%>
改了也还是那样,E:\tomcat\work\localhost_8080%2Fwangf\_0002fbean_0002ejspbean_jsp_0.java:89: Invalid character in input. ?? ^ 是什么意思? 哪位有可以运行的例子,发给我,可能是程序外的问题, 希望是调试了,能运行的。 [email protected] 谢谢了。
改为:
double rate=0;
\webapps\examples\WEB-INF\classes\tax
里了。
Error: 500
Location: /examples/bean.jsp
Internal Servlet Error:org.apache.jasper.JasperException: Cannot find any information on property 'Rate' in a bean of type 'tax.TaxRate'
at org.apache.jasper.runtime.JspRuntimeLibrary.getReadMethod(JspRuntimeLibrary.java:619)...
我把Rate已经改成rate了,怎么还说"Rate"呢?
另外我自己建了个虚拟目录运行时显示:
Error: 500
Location: /wangf/bean.jsp
Internal Servlet Error:org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.
E:\tomcat\work\localhost_8080%2Fwangf\_0002fbean_0002ejspbean_jsp_0.java:89: Invalid character in input.
??
^
E:\tomcat\work\localhost_8080%2Fwangf\_0002fbean_0002ejspbean_jsp_0.java:89: Invalid character in input.
??
^
2 errors, 1 warning at org.apache.jasper.compiler.Compiler.compile(Compiler.java:247)...
怎么错误不同呢?另外自己建目录后,classpath要不要加入新的路径?
??
^
是什么意思?
哪位有可以运行的例子,发给我,可能是程序外的问题,
希望是调试了,能运行的。
[email protected]
谢谢了。
主要修改的位置 bean中rate小写
并且在jsp中属性调用 税率:<jsp:getProperty name="taxbean" property="rate"/>
rate小写