Jsp If条件判断问题. - Java / Web 开发
新手:
tomcat+struts 2.0
jsp 页面直接关联model
现在需要根据model(admin)里面的一个item(id),判断jsp页面出现的内容.
大概流程:
...
<table>
<tr>
<td>
<s:if admin.id is null> ---这个地方不知道怎么写 , admin.id是String类型
<s:text name="admin.name"></s:text>
</s:if>
<s:else>
<s:text name="admin.title"></s:text>
</s:else>
</td>
</tr>
</table>
...
<s:if test="#admin.name == null">
4. <s:if test="#request.admin.id == null">
谢谢ls两位的回复.经过测试.
1. <s:if test="admin.id == null">
2. <s:if test="%{admin.id == null}">
3. <s:if test="%{#request.admin.id == null}">
4. <s:if test="#request.admin.id == null">
都能达到我的要求.
jf
不懂 顶下
学习
Java code:
1. <s:if test="admin.id == null">
2. <s:if test="%{admin.id == null}">
3. <s:if test="%{#request.admin.id == null}">
4. <s:if test="#request.admin.id == null">
相关问答:
问题是这样的:
我有一个文件nagiv.jsp 另一个文件failure.jsp包含他,同时nagiv文件中有一个可以跳转到yy.jsp的commandButton,但是我将failure中点击nagiv中的哪个commandButton,也面不会跳转 ......
工作需要 求大家帮忙写个程序
我是学C++的 不懂JAVA
编写一个Java应用程序,对于给定的一个字符串的集合,格式如:
{aaa bbb ccc}, {bbb ddd},{eee fff},{ggg},{ddd hhh}
要求将其中交集不为空的 ......
怎么在控制台中输入类似下面的信息:
s1234 50
s1235 80
s1234 90
s1234 40
s1236 90
每当回车时 ......