/web/DRCP/src/com/bluesky/drcp/presentation/web/ShowSomethingAction.java

http://drcp.googlecode.com/ · Java · 23 lines · 17 code · 6 blank · 0 comment · 0 complexity · 4acd60145349c36d54725e54df91c010 MD5 · raw file

  1. package com.bluesky.drcp.presentation.web;
  2. import javax.servlet.http.HttpServletRequest;
  3. import javax.servlet.http.HttpServletResponse;
  4. import org.apache.struts.action.Action;
  5. import org.apache.struts.action.ActionForm;
  6. import org.apache.struts.action.ActionForward;
  7. import org.apache.struts.action.ActionMapping;
  8. public class ShowSomethingAction extends Action {
  9. public ActionForward execute(ActionMapping mapping, ActionForm form,
  10. HttpServletRequest request, HttpServletResponse response)
  11. throws Exception {
  12. String age = request.getParameter("age");
  13. request.setAttribute("name","jack");
  14. request.setAttribute("age",age);
  15. return mapping.findForward("success");
  16. }
  17. }