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

📄 alteritemviewaction.d

📁 本人课程设计时做的一个用struts框架实现的基于cmmi2的项目管理系统的原型。还有部分功能尚未实现
💻 D
字号:
// Created by Xslt generator for Eclipse.
// XSL :  not found (java.io.FileNotFoundException:  (The system cannot find the path specified))
// Default XSL used : easystruts.jar$org.easystruts.xslgen.JavaClass.xsl

package com.cmmi2pms.sa.project;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpSession;
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;

/** 
 * AddprojectAction.java created by EasyStruts - XsltGen.
 * http://easystruts.sf.net
 * created on 04-12-2004
 * 
 * XDoclet definition:
 * @struts:action path="/addproject" name="addProjectForm" input="/pages/SA/project/addproject.jsp" validate="true"
 * @struts:action-forward name="/pages/failure.htm" path="/pages/failure.htm" redirect="true"
 * @struts:action-forward name="/pages/success.htm" path="/pages/success.htm" redirect="true"
 */
public class AlterItemViewAction extends Action {

	// --------------------------------------------------------- Instance Variables

	// --------------------------------------------------------- Methods

	/** 
	 * Method execute
	 * @param ActionMapping mapping
	 * @param ActionForm form
	 * @param HttpServletRequest request
	 * @param HttpServletResponse response
	 * @return ActionForward
	 * @throws Exception
	 */
	public ActionForward perform(ActionMapping mapping,
			ActionForm form,
			HttpServletRequest request,
			HttpServletResponse response)
	throws IOException, ServletException {
		
		StringBuffer message =
						  new StringBuffer("add project is called");
		servlet.log(message.toString());
		
		AddProjectForm addProjectForm = (AddProjectForm) form;
		Project newProject = new Project();
		
		
		System.out.println("-----项目projectID" + toChinese(addProjectForm.getProjectID()));
		newProject.createProject(addProjectForm);
		newProject.getProjectInfor(addProjectForm.getProjectID());
		
		HttpSession session = request.getSession();
		session.setAttribute("projectInfor", newProject);
		
		return (mapping.findForward("SUCCESS"));
		//throw new UnsupportedOperationException("Generated method 'execute(...)' not implemented.");
	}
	
	public static String toChinese(String strvalue)
    {
        try{
        	if(strvalue==null)
        		return null;
        	else
        	{
        		strvalue = new String(strvalue.getBytes("ISO8859_1"), "GBK");
        		return strvalue;
        	}
        }catch(Exception e){
        	return null;
        }
    } 


}

⌨️ 快捷键说明

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