package com.mingsoft.servlet.admin.web;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import net.sf.json.JSONObject;
import com.mingsoft.biz.IWebBiz;
import com.mingsoft.biz.impl.WebBizImpl;
import com.mingsoft.constant.JspPage;
import com.mingsoft.entity.WebEntity;
import com.mingsoft.servlet.BaseServlet;
 
/**
 * 网站信息修改的 控制层
 * @author 张敏
 * 技术支持：铭飞科技
 * 官网：www.ming-soft.com
 */
@SuppressWarnings("serial")
public class WebEditServlet extends BaseServlet {
 

	/**
	 * 网站信息修改
	 */
	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		
			super.doGet(request, response);
			request.getRequestDispatcher(JspPage.WEBINFO_EEDIT).forward(request,response);
	}

	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
			super.doPost(request, response);
//			response.setContentType("text/x-json;charset=utf-8");
			PrintWriter out = response.getWriter();
			IWebBiz webBiz = new WebBizImpl();
			WebEntity webentity = webBiz.queryWebInfo(1);
			JSONObject src = JSONObject.fromObject(webentity);
			out.print(src);
			out.close();
	}

}
