⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 updateguestbookaction.java

📁 用于进行书写定单的源代码.请各位一定要好好研究
💻 JAVA
字号:
package com.enlen.book;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.uniland.common.CallService;
import com.uniland.dao.DaoParam;
import com.uniland.dao.RowSet;
import com.uniland.knowledge.ModifyLogForm;

public class UpdateGuestBookAction extends Action {

	/**
	* Constructor
	*/
	public UpdateGuestBookAction() {

		super();

	}
	public ActionForward execute(
		ActionMapping mapping,
		ActionForm form,
		HttpServletRequest request,
		HttpServletResponse response)
		throws Exception {
		ActionErrors errors = new ActionErrors();
		ActionForward forward = new ActionForward();
		 //RowSet rs = ( (UpdateGuestBookForm) form).getRowSet();
    	// request.setAttribute("guestbook",rs);
		
        try {
        	DaoParam sver=new DaoParam();
			String Sql = "";
           String title = request.getParameter("title");
           String text = request.getParameter("text");
           String oper = request.getParameter("oper");
           String other = request.getParameter("other");
           text =new String (text.getBytes("iso-8859-1"),"gb2312");
           title =new String (title.getBytes("iso-8859-1"),"gb2312");
           
        	Sql = "UPDATE guestbook SET other='" + other + "' ,title='" + title + "' , text='" + text + "'";
            Sql += " WHERE id = '" + request.getParameter("id")+"'";
           CallService.getDao().runSQL(Sql);
            
        }catch(Exception e)
		{
			e.getStackTrace();
		}
		return mapping.findForward("success");
        }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -