myaction="del" 写错了
~~而且
不能用==来比较
用equals方法
~~而且
不能用==来比较
用equals方法
解决方案 »
- s2sh开发中,代码运行中“假死”
- <c:forEach>中的变量范围问题
- *.hbm.xml文件异常
- log4j.properties文件里设置输出的时间怎么跟我电脑的时间不同步? 好像行数也要差几行,这是怎么回事?
- tomcat5.5查找文件路径的问题
- JSP多条件查询中的分页解决?
- 一个很小的不能输入为空的JSP问题……在线等
- TOMCAT整合APACHE半成品,遗留问题请教!
- jsp struts从数据库 中的导入的数据与用户新增数据的不同处理
- 滚动条到达页面底部自动加载下一页数据,使用鼠标滚动条的话,就自动加载两次,求解
- JSP简单问题,在线等待
- 写JSP时编译JAVABEAN用什么软件又好用又不需太消耗资源
而这样可以: myaction.equals("del")
...
}
******引自 Java api文档********
equals
public boolean equals(Object anObject)
Compares this string to the specified object. The result is true if and only if the argument is not null and is a String object that represents the same sequence of characters as this object.
Overrides:
equals in class Object
Parameters:
anObject - the object to compare this String against.
Returns:
true if the String are equal; false otherwise.
See Also:
compareTo(java.lang.String), equalsIgnoreCase(java.lang.String)
*********************
http://www.charry.org/article/list.asp?id=53