以下是一个简单的Struts2发送参数到JSP页面的例子:

1. 创建一个Struts2的Action类

struts2发送参数到jsp页面实例,Struts2发送参数到JSP页面实例  第1张

```java

package com.example.action;

import com.opensymphony.xwork2.ActionSupport;

public class HelloAction extends ActionSupport {

private String name;

public String getName() {

return name;

}

public void setName(String name) {

this.name = name;

}

public String execute() {

return SUCCESS;

}

}

```

2. 配置struts.xml文件

```xml

本文由 @城荒梦散 发布在 方特通技术,如有疑问,请联系我们。
文章链接:http://www.fttzx.cn/article/hTOLjK_tKhAQSUQPNreop