/*
 * Generated by MyEclipse Struts
 * Template path: templates/java/JavaClass.vtl
 */
package admin.gg;

import gonggao.GG;
import database.DBConn;
import javax.servlet.http.HttpServletRequest;
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;

/** 
 * MyEclipse Struts
 * Creation date: 05-26-2008
 * 
 * XDoclet definition:
 * @struts.action path="/addGG" name="addGG" scope="request" validate="true"
 * @struts.action-forward name="ok" path="/admin/newsok.jsp"
 */
public class AddGGAction extends Action {
	/*
	 * Generated Methods
	 */

	/** 
	 * Method execute
	 * @param mapping
	 * @param form
	 * @param request
	 * @param response
	 * @return ActionForward
	 */
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) {
		AddGGForm addGG = (AddGGForm) form;// TODO Auto-generated method stub
		GG gg = new GG();
		gg.setTitle(addGG.getTitle());
		gg.setContent(addGG.getContent());
		new DBConn().addGG(gg);
		return mapping.findForward("ok");
	}
}