<%! String str1,str;%>这里是干什么?那个感叹号有什么用??
解决方案 »
- 请教servlet/jsp
- 怎样做出这样的界面
- <a href 标签,如何初始化时,是他不可用?
- [help]JSTL1.1。2标签库所带standard-examples/xml目录中的程序全不能运行
- 目前明很多XMl的解析工具(可双向操作或单向操作),大家使用什么工具?
- jsp初级问题之三
- jquery-easyui的treegrid无法得到后台数据
- Quartz定时器 报错
- 关于EL表达式的小问题
- 我用的是resin-2.1.2,启动的时候,能不能不弹出那个小的window窗口,而只显示那个dos窗口????
- 请问如何运行classes目录下层的servlet?多谢了!
- jsp页面运行错误,如何判断错误的行数?
用来定义变量的,你的问题不是一个问题,一两句话说不清,最好自己到网上查查肯定有答案
这是声名变量,大侠们,其他地方没错,
就是我导入bean 跟applet 的时候出错的!!!!
你们看来也是
<font color="#FF3366"><%=hw.getString()%></font>
<br>
<%hw.setString="hello word !!!"%>//这句问题???
<br>
<font color="#CC9966">你hao ma 吗?<%=hw.getString()%></font>
<applet code="helloworld.class" width="156" height="80"></applet>
真的这个applet就不可以用吗?
这段代码有问题,去掉之后就可以正常了。贴出你的bean代码
我想是跟我的路径有映射有关系,一直提示我的文件不存在,
我的bean是这样的,很简单的。
我的bean是这样:
package hello;
public class hello
{
String s;
public hello()
{ this.s="hello world!";
}
public void setString(String mystring)
{
this.s=mystring;
}
public String getString()
{
return(this.s); }
}
<font color="#FF3366"><%=hw.getString()%></font>
<br>
<%hw.setString("hello word !!!");%>//原来的代码<%hw.setString="hello word !!!"%>
<br>
<font color="#CC9966">你hao ma 吗?<%=hw.getString()%></font><applet code=".\WEB-INF\classes\hello\hello.class" width="156" height="80"></applet>//要指定倒入类的路径
以上是修改后的代码。此外,applet和bean是不一样的,所以页面执行的结果是applet什么都没有