struct2笔记之<s:set />的使用

来源:互联网 发布:关于化学的软件 编辑:程序博客网 时间:2024/05/17 23:46
<%@ taglib prefix="s" uri="/struts-tags"%><body><%String connect = "true";request.setAttribute("connect", connect);String ss = "wang";%><%=connect%>,<%=ss%>,<s:set name="canw1" value="<%= connect %>"></s:set><s:property value="#canw1" />,<s:if test='#canw1 >=true'><input class="button" type="submit" name="goto"value="<s:property value="#canw1"/>" id="defaultFocus"onclick="funnext();" />ok${canw1} </s:if><s:else><input class="button" type="submit" name="goto"value="<s:property value="#canw1"/>" id="defaultFocus"disabled="disabled" />not ok${canw1} </s:else><s:if test="%{#ss=='wang'}">wang</s:if><br /><s:set name="canw2" value="#request.connect"></s:set><s:property value="#canw2" />,<s:if test='#canw2 =="true"'>ok,${canw2} </s:if></body>
另外可以在tomcat目录work\Catalina\localhost下查看jsp翻译成servlet的源码。
0 0
原创粉丝点击