アクション実行2回


xworkは
class="com.ekangcount.website.system.view.action.UserTypeAction">

/admintemplet/user/useradd.jsp


userTypeAction
add
${success}



JAvaは
<%@ page language="java"pageEncoding="UTF-8"%>
<%@ taglib uri="webwork"prefix="ww"%>






ロールの追加

function demo(){
document.forms.usertypeform.submit();
}






追加成功

繰り返しコミット



< td height="14"background="EEF 2 F 2"bgcolor="EEF 2 F 2"class="leftAndTop">キャラクタ名:

キャラクターの追加
< input type="text"name="userType.typename"checkInfo="キャラクタ名;NOTULL;No"/>>>>>







 
/*
	 *       
	 */
	public String add() throws ServletException, IOException{
		System.out.println("-------------------------------------------");
		
		HttpServletResponse response = ServletActionContext.getResponse();
		response.setContentType("text/html;charset=utf-8");
		HttpServletRequest request = ServletActionContext.getRequest();
		System.out.println(request.getRequestedSessionId());
		boolean result = this.getUserTypeSerivce().createUserType(userType);
		System.out.println(result);
		
		if(result){
			this.success="true";
		}else{
			this.success="false";
		}
		
		//request.setAttribute("usertypeadd.jsp?${params}","success=true");
	//	response.sendRedirect("usertypeadd.jsp");
	//	request.getRequestDispatcher("usertypeadd.jsp").forward(request,response); 
		
		return "ssst";
		
	}