锘??xml version="1.0" encoding="utf-8" standalone="yes"?>日韩精品一二三四区,99精品黄色片免费大全,国产毛片一区二区三区http://www.aygfsteel.com/lihang-87/archive/2009/03/26/261947.html#262176鏃犲嵃涔嬭礬鏃犲嵃涔嬭礬Thu, 26 Mar 2009 09:40:00 GMThttp://www.aygfsteel.com/lihang-87/archive/2009/03/26/261947.html#262176Hello.jsp
<s:from action=鈥滺elloAction鈥?mothod=鈥漰ost鈥?gt;
<s:textfield name="helloform.content"></s:textfield>
<s:submit value="鎻愪氦"></s:submit>
</s:from>
HelloAction.java
import javax.servlet.http.HttpServletRequest;
import org.apache.struts2.ServletActionContext;
import com.opensymphony.xwork2.ActionSupport;
public class HelloAction extends ActionSupport {
private HelloForm helloform;
public HelloForm getHelloform() {
return helloform;
}
public void setHelloform(HelloForm helloform) {
this.helloform = helloform;
}
public String input(){
HttpServletRequest request = ServletActionContext.getRequest();
if(helloform.getContent().equals("Hello")){
String input=helloform.getContent();
request.setAttribute("input","hello world!");
}else{
request.setAttribute("input","杈撳叆閿欒錛?quot;);
}
System.out.println(helloform.getContent());
return SUCCESS;
}
}
Sayhllo.jsp
<body>
<%=request.getAttribute("input") %>
</body>

]]>
主站蜘蛛池模板:
泽州县|
彩票|
涡阳县|
博罗县|
垣曲县|
志丹县|
乾安县|
临沭县|
江川县|
屏东市|
石家庄市|
宜丰县|
宜都市|
信阳市|
武宣县|
开平市|
信丰县|
巴彦县|
融水|
屯门区|
西城区|
思南县|
陆丰市|
东山县|
民和|
安宁市|
天台县|
张家川|
邹城市|
五原县|
怀化市|
澎湖县|
平和县|
商水县|
肃北|
阿尔山市|
阳江市|
拉萨市|
庆城县|
大化|
芮城县|