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">
相关问答:
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jas ......
private static final String URL = "jdbc:oracle:thin:@localhost:1521:orcl";
private static final String USERNAME = "sys";
private static final String PASSWORD = "s ......
工作需要 求大家帮忙写个程序
我是学C++的 不懂JAVA
编写一个Java应用程序,对于给定的一个字符串的集合,格式如:
{aaa bbb ccc}, {bbb ddd},{eee fff},{ggg},{ddd hhh}
要求将其中交集不为空的 ......
<html><head><title>[@title]</title>
<meta http-equiv=Content-Type content="text/html; charset=gb2312">
<script language='javascript'>
function diyCheck ......