此回复为自动发出,仅用于显示而已,并无任何其他特殊作用
楼主【so8610】截止到2008-07-30 20:00:11的历史汇总数据(不包括此帖):
发帖的总数量:1 发帖的总分数:0 每贴平均分数:0
回帖的总数量:1 得分贴总数量:0 回帖的得分率:0%
结贴的总数量:1 结贴的总分数:0
无满意结贴数:1 无满意结贴分:0
未结的帖子数:0 未结的总分数:0
结贴的百分比:100.00% 结分的百分比:---------------------
无满意结贴率:100.00% 无满意结分率:---------------------
敬礼!
取消马甲机器人,请点这里:http://www.java2000.net/mycsdn/robotStop.jsp?usern=so8610
楼主【so8610】截止到2008-07-30 20:00:11的历史汇总数据(不包括此帖):
发帖的总数量:1 发帖的总分数:0 每贴平均分数:0
回帖的总数量:1 得分贴总数量:0 回帖的得分率:0%
结贴的总数量:1 结贴的总分数:0
无满意结贴数:1 无满意结贴分:0
未结的帖子数:0 未结的总分数:0
结贴的百分比:100.00% 结分的百分比:---------------------
无满意结贴率:100.00% 无满意结分率:---------------------
敬礼!
取消马甲机器人,请点这里:http://www.java2000.net/mycsdn/robotStop.jsp?usern=so8610
解决方案 »
- csdn会员快到期,还有1100多次免积分下载,可帮助需要的人下载
- tortoise svn一个非常奇怪的问题
- 弱弱的问个java web程序启动问题...
- 刚接触的一个JAVA的C/S项目,以前没搞过,有点疑问
- JBPM无法解决的问题
- 谁能介绍WEB Service相关书,要求是中文的,我要买,书好的话给分!!!
- 谢谢帮忙看一下 这次给分了
- 困扰很久的问题!!!急切盼望解决
- jwsdp中序列化时出现这种异常,请问是什么原因导致的?
- java.util.concurrent.TimeoutException: Idle timeout expired: 30000/30000 ms
- applet怎样连接到数据库啊
- 大家好
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package Hello;//import javax.servlet.http.RequestDispatcher;
//import javax.servlet.http.ServleException;
import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpServletResponse;import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;
import org.apache.struts.action.ActionMessages;
import org.apache.struts.util.MessageResources;//import com.myapp.struts.PersonBean;
//import com.myapp.struts.form.HelloForm;
/**
* @struts.action path="/hello" name="helloForm"
* input="/form/hello.jsp" scope="request" validate="true"
*/
public final class HelloAction extends Action { /* forward name="success" path="" */
private final static String SUCCESS = "SayHello"; /**
* This is the action called from the Struts framework.
* @param mapping The ActionMapping used to select this instance.
* @param form The optional ActionForm bean for this request.
* @param request The HTTP Request we are processing.
* @param response The HTTP Response we are processing.
* @throws java.lang.Exception
* @return
*/
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
MessageResources messages = getResources(request);
ActionMessages errors = new ActionMessages();
String userName = (String) ((HelloForm) form).getUserName(); String badUserName = "Monster"; if (userName.equalsIgnoreCase(badUserName)) {
errors.add("username", new ActionMessage("hello.dont.talk.to.monster",
badUserName));
saveErrors(request, errors);
return (new ActionForward(mapping.getInput()));
}
PersonBean pb = new PersonBean();
pb.setUserName(userName);
pb.saveToPersistentStore(); request.setAttribute(Constants.PERSON_KEY, pb); request.removeAttribute(mapping.getAttribute()); return mapping.findForward("SayHello"); }
}
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package Hello;import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionMessage;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;public final class HelloForm extends ActionForm { private String userName = null; public String getUserName() { return (this.userName);
}
public void setUserName(String userName) { this.userName = userName;
}
/**
* Reset all properties to their default values.
*/
public void reset(ActionMapping mapping, HttpServletRequest request) { this.userName = null;
} public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request) {
ActionErrors errors = new ActionErrors();
if ((userName == null) || (userName.length() < 1)) {
errors.add("username", new ActionMessage("hello.no.username.error"));
}
return errors;
}
}
hello.HelloAction第一个Hello是大写的