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

📄 action.java

📁 sturts2.0一个很简单的例子,用于初学者参考的简单dome
💻 JAVA
字号:
package com.alveole.helloworld;import org.apache.struts2.ServletActionContext;import com.opensymphony.xwork2.ActionSupport;public class Action extends ActionSupport {	private String view;	public String getView() {		return view;	}	public void setView(String view) {		this.view = view;	}	/**	 * Struts action implementation for node Initialization on session	 * @return a link to follow	 */	public String init() {	    return "success";	}	/**	 * Struts action implementation for node Hello World action	 * @return a link to follow	 */	public String hello() {	    return getView();	}	/**	 * Struts action implementation for node Close session	 * @return a link to follow	 */	public String close() {		ServletActionContext.getRequest().getSession().invalidate();	    return "success";	}}

⌨️ 快捷键说明

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