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

📄 login.java

📁 一派出所的网站,用extjs2.0实现的后台管理 开发环境eclipse3.1.1+myeclipse4.1.1GA+mysql5.0
💻 JAVA
字号:
package com.onemid.mohan.login.action;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;

import com.onemid.mohan.cms.Action;
import com.opensymphony.xwork2.ActionSupport;

public class Login extends ActionSupport {

    public static final String MESSAGE = "Struts is up and running ...";

    public String execute() throws Exception {
    	
    	//XmlBeanFactory factory = new XmlBeanFactory(new ClassPathResource("beans.xml"));
    	//ApplicationContext factory = new ClassPathXmlApplicationContext("applicationContext.xml");
    	//ApplicationContext factory = new FileSystemXmlApplicationContext("C:\\Tomcat 5.0\\webapps\\tutorial\\WEB-INF\\applicationContext.xml");
    	ApplicationContext factory = new FileSystemXmlApplicationContext("classpath:../applicationContext.xml");
    	
    	    	
    	    	
    	Action action = (Action)factory.getBean("validateAction");
    	Action action1 = (Action)factory.getBean("upperAction");
    	String strtmp = action.execute("lower case");
    	
        setMessage(strtmp);
        setMessage1(action1.execute("UPPER CASE"));
        
        
        
        return SUCCESS;
    }

    private String message;
    private String message1;

    public void setMessage(String message){
        this.message = message;
    }

    public String getMessage() {
        return message;
    }

	public String getMessage1() {
		return message1;
	}

	public void setMessage1(String message1) {
		this.message1 = message1;
	}
}

⌨️ 快捷键说明

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