Topic: javabean不会用,菜鸟求助 |
Print this page |
1.javabean不会用,菜鸟求助 | Copy to clipboard |
Posted by: b0r0j0 Posted on: 2005-02-16 17:14 小弟我对bean实在是一头雾水 我在WEB-INF/classes里建了个wordspeak.class,内容如下 package tom; public class wordspeak { String title; public String speak() { title="1111"; return title; } } 我在前台调用的时候 <jsp:useBean id="shuo" class="tom.wordspeak" scope="page"/></jsp:useBean> <%=shuo.speak()%> 显示错误,哪位大哥来指出一下哪的毛病 错误如下: org.apache.jasper.JasperException: tom.wordspeak.speak()Ljava/lang/String; |
2.Re:javabean不会用,菜鸟求助 [Re: b0r0j0] | Copy to clipboard |
Posted by: b0r0j0 Posted on: 2005-02-17 08:02 怪了,早上从新开服务器好象又没有问题了~~ |
3.Re:javabean不会用,菜鸟求助 [Re: b0r0j0] | Copy to clipboard |
Posted by: YuLimin Posted on: 2005-02-17 12:56 1、路径?wordspeak.class是否在WEB-INF/classes/tom目录下? 2、报Ljava/lang/String??? 是不是J编译的DK版本与TOMCAT所用的JRE版本问题? |
4.Re:javabean不会用,菜鸟求助 [Re: b0r0j0] | Copy to clipboard |
Posted by: 孤独王子 Posted on: 2005-02-19 00:14 b0r0j0 wrote: 标记关了2次 <jsp:useBean id="shuo" class="tom.wordspeak" scope="page"/></jsp:useBean> 你已经用/>关闭了 九不用再</jsp:useBean>了啊! |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |