在eclipse下搭建struts2框架

 时间:2026-04-23 00:33:43

1、建立project,此处以demo为例。

在eclipse下搭建struts2框架

2、导入struts2的基础包,若没有struts2可到网上下载,将压缩文件加压后从lib文件夹下把以下jar复制到project的WEB-INF下的lib文件夹中commons-fileupload-xx.jar,commons-io-xx.jar,commons-lang3-xx.jar,freemarker-xx.jar,ognl-xx.jar,struts2-core-xx.jar,xwork-core-xx.jar;其中xx代表不同的版本号。

在eclipse下搭建struts2框架

3、配置web.xml文件。图中1是头文件,2、3是struts2核心过滤器配置;

在eclipse下搭建struts2框架

4、配置struts.xml文件。主要是对action的配置。

在eclipse下搭建struts2框架

5、到此为止基本的框架就搭建好了,能够满足初学用了。

  • Unity3D如何更改系统采样率
  • js实现点击按钮,指定文字颜色闪三秒钟就停止
  • c# 时间设置指南
  • dreamweaver如何创建Bootstrap产品#校园分享#
  • linux如何安装tomcat并如何运行tomcat
  • 热门搜索
    鸡爪子怎么做好吃 获奖情况怎么写 油汀取暖器怎么样 安卓微信怎么设置主题皮肤 大众高尔夫怎么样 虫草怎么吃效果最好 卫生间怎么装修 圆的体积怎么算 浑身酸痛是怎么回事 怎么下载youtube