锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲午夜精品久久久久久app,成人在线视频一区,九九九九九九精品任你躁http://www.aygfsteel.com/illu/category/33535.html紓ㄧ粌鍦ㄧ敓媧葷殑璋峰簳zh-cnTue, 12 Aug 2008 14:50:35 GMTTue, 12 Aug 2008 14:50:35 GMT60- Struts鏍囩瀛︿範(涓?-html鏍囩http://www.aygfsteel.com/illu/articles/221537.html搴旇秺搴旇秺Tue, 12 Aug 2008 09:40:00 GMThttp://www.aygfsteel.com/illu/articles/221537.htmlhttp://www.aygfsteel.com/illu/comments/221537.htmlhttp://www.aygfsteel.com/illu/articles/221537.html#Feedback0http://www.aygfsteel.com/illu/comments/commentRss/221537.htmlhttp://www.aygfsteel.com/illu/services/trackbacks/221537.html闃呰鍏ㄦ枃

]]> - Struts鏍囩瀛︿範(浜?-logic鏍囩 http://www.aygfsteel.com/illu/articles/220787.html搴旇秺搴旇秺Thu, 07 Aug 2008 15:22:00 GMThttp://www.aygfsteel.com/illu/articles/220787.htmlhttp://www.aygfsteel.com/illu/comments/220787.htmlhttp://www.aygfsteel.com/illu/articles/220787.html#Feedback0http://www.aygfsteel.com/illu/comments/commentRss/220787.htmlhttp://www.aygfsteel.com/illu/services/trackbacks/220787.html闃呰鍏ㄦ枃

]]> - Struts鏍囩瀛︿範(涓)-bean鏍囩http://www.aygfsteel.com/illu/articles/220195.html搴旇秺搴旇秺Tue, 05 Aug 2008 07:56:00 GMThttp://www.aygfsteel.com/illu/articles/220195.htmlhttp://www.aygfsteel.com/illu/comments/220195.htmlhttp://www.aygfsteel.com/illu/articles/220195.html#Feedback0http://www.aygfsteel.com/illu/comments/commentRss/220195.htmlhttp://www.aygfsteel.com/illu/services/trackbacks/220195.html
涓銆丅ean鏍囩
1.<bean:define> 瀹氫箟鎴栧鍒朵竴涓璞?br />
eg錛?
<%@ page language="java" pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<html:html lang="true">
<head>
<title>bean_define</title>
</head>
<body>
<bean:define id="str" value="Hello">
<h1>${str}</h1>
</body>
</html:html>
2.<bean:size>姹傚嚭闀垮害錛屾暟緇勩丆ollection銆丮ap
Collection eg錛?br />
<%@ page language="java" pageEncoding="GB2312"%>
<%@ page import="java.util.*"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<html:html lang="true">
<head>
<title>bean_size</title>
</head>
<body>
<%
Collection coll= new ArrayList() ;
coll.add("鍖椾含") ;
coll.add("涓婃搗") ;
coll.add("瑗垮畨") ;

// 灝咰ollection瀵硅薄淇濆瓨鍦ㄥ洓縐嶅睘鎬ц寖鍥翠箣涓?br />
request.setAttribute("coll",coll) ;
%>
<bean:size id="len" name="coll" scope="request"/>
<h1>闀垮害鏄細${len}</h1>
</body>
</html:html>
map eg:
<%@ page language="java" pageEncoding="GB2312"%>
<%@ page import="java.util.*"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<html:html lang="true">
<head>
<title>bean_size</title>
</head>
<body>
<%
Map m = new HashMap() ;
m.put("one","1") ;
m.put("two","2") ;
m.put("three","3") ;

// 灝哅ap瀵硅薄淇濆瓨鍦ㄥ洓縐嶅睘鎬ц寖鍥翠箣涓?br />
request.setAttribute("namemap",m) ;
%>
<bean:size id="len" name="namemap" scope="request"/>
<h1>闀垮害鏄細${len}</h1>
</body>
</html:html>

3.<bean:write>鎵撳嵃瀵硅薄鎴栧璞′腑鐨勫睘鎬?綾諱技浜?{}鐨勫姛鑳?br />
eg錛?br />
鍏堢紪鍐欎竴涓狿erson綾?JavaBean)
package com.illu;


public class Person
{
private String name;
private String password;

public Person()
{}

public String getName()
{
return name;
}

public void setName(String name)
{
this.name = name;
}

public String getPassword()
{
return password;
}

public void setPassword(String password)
{
this.password = password;
}
}
鐒跺悗鍦ㄧ紪鍐檍sp欏甸潰
<%@ page language="java" pageEncoding="GB2312"%>
<%@ page import="java.util.*"%>
<%@ page import="com.illu.Person"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<html:html lang="true">
<head>
<title>bean_write</title>
</head>
<body>
<jsp:useBean id="person" class="com.illu.Person" scope="request"/>
<jsp:setProperty name="person" property="name" value="illu"/>
<jsp:setProperty name="person" property="password" value="123456789"/>
<h1>浣跨敤EL錛?/span></h1>
<h2>濮撳悕錛?{person.name}</h2>
<h2>瀵嗙爜錛?{person.password}</h2>
<hr>
<h1>浣跨敤Bean鏍囩錛?/span></h1>
<h2>濮撳悕錛?/span><bean:write name="person" property="name" scope="request"/></h2>
<h2>瀵嗙爜錛?/span><bean:write name="person" property="password" scope="request"/></h2>
</body>
</html:html>
4.<bean:message>Struts 鍥介檯鍖?鎴栬皟鐢⊿truts鐨勬秷鎭祫婧愰厤緗枃浠?鐢ㄤ簬淇濆瓨鏄劇ず淇℃伅)
eg:
棣栧厛鍦╯truts-config.xml涓厤緗秷鎭祫婧愰厤緗枃浠訛紝鍔犲叆涓涓嬩唬鐮佸嵆鍙?
<message-resources parameter="illu.struts.ApplicationResources" />
鍐嶅湪illu.struts涓嬪垱寤篈pplicationResources.properties鏂囦歡
鍦ㄦ枃浠朵腑鍔犲叆welcome = welcome {0} !
{0}琛ㄧず鍙傛暟浣嶇疆
<%@ page language="java" pageEncoding="GB2312"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<head>
<title>bean_message</title>
</head>
<body>
<bean:message key="welcome" arg0="illu"/>
</body>
</html:html>

]]>
主站蜘蛛池模板:
彰化市|
和龙市|
东乌珠穆沁旗|
清流县|
沾化县|
遂川县|
扶余县|
锡林浩特市|
呼图壁县|
肇东市|
溆浦县|
拜城县|
临夏县|
屏边|
基隆市|
延吉市|
锡林郭勒盟|
勐海县|
新兴县|
东莞市|
阳山县|
公安县|
七台河市|
深水埗区|
宣城市|
元江|
乐山市|
长宁区|
蓬安县|
金寨县|
航空|
平南县|
秀山|
东乌珠穆沁旗|
景谷|
武清区|
宝应县|
韶山市|
马公市|
阿拉善左旗|
株洲县|