1. Official Website
http://struts.apache.org/
Click struts2.3.4(GA) in Documentation
Click download now
* Version Notes (包含下面 4 个文件)
* Full Distribution:
o struts-2.3.4-all.zip (76mb) [PGP ] [MD5 ]
* Example Applications:
o struts-2.3.4-apps.zip (29mb) [PGP ] [MD5 ]
* Essential Dependencies Only:
o struts-2.3.4-lib.zip (15mb) [PGP ] [MD5 ]
* Documentation:
o struts-2.3.4-docs.zip (33mb) [PGP ] [MD5 ]
* Source:
o struts-2.3.4-src.zip (6mb) [PGP ] [MD5 ]
2. 包结构
3. 创建第一个项目
http://struts.apache.org/2.x/docs/create-struts-2-web-application-with-artifacts-in-web-inf-lib-and-use-ant-to-build-the-application.html
Official Seven Steps:
Step 1 - Create A Basic Java Web Application
Step 2 - Add index.jsp and Ant Build File
Step 3 - Add Struts 2 Jar Files To Class Path
Step 4 - Add Logging
Step 5 - Add Struts 2 Servlet Filter
Step 6 - Create struts.xml
Step 7 - Build and Run the Application
a. copy struts-2.2.1\apps\struts2-blank-2.2.1\WEB-INF\lib to /Basic_Struts2_Ant/WebContent/WEB-INF/lib
b. add filter to web.xml
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
c. Create struts.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<constant name="struts.devMode" value="true" />
<package name="basicstruts2" extends="struts-default">
<action name="index">
<result>/index.jsp</result>
</action>
</package>
</struts>
d. Add Jsp
e. deploy to tomcat and run the application
f. open http://localhost:8080/Basic_Struts2_Ant/index.action successful.
分享到:
相关推荐
《Linux From Scratch(简体中文版)》是一本详尽的指南,旨在帮助用户了解并构建自己的Linux系统,从源代码开始,完全按照个人需求进行定制。这一过程通常被称为LFS(Linux From Scratch)。LFS项目不仅是一个技术...
Data Science from Scratch, 2nd Edition
Data Science from Scratch First Principles with Python 英文无水印pdf pdf所有页面使用FoxitReader和PDF-XChangeViewer测试都可以打开 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自...
Machine Learning from Scratch
Linux From Scratch中文技术文档 Linux From Scratch中文技术文档 Linux From Scratch中文技术文档
Python implementations of some of the fundamental Machine Learning models and algorithms from scratch. The purpose of this project is not to produce as optimized and computationally efficient ...
Data Science from Scratch First Principle with Python
此为Linux From Scratch 6.2 中文手册,译者: 金步国(0-5章) ipconfigme(6-7章) bobkey(8-9章) 发布日期:2008年3月1日 [最终正式版] 同时包含英文版,便于读者对照。 ------------------------------ 我的评价:...
C++ From Scratch l Chapter 1 - Introduction l Chapter 2 - Getting Started l Chapter 3 - Program Flow l Chapter 4 - Creating Classes l Chapter 5 - Playing the Game l Chapter 6 - Using Linked Lists l ...
说是数据科学指路到是差不多。告诉你有哪些方面的知识需要去学习的。25章每章都值得单独去借上一两本书去学习,都值得花上一两个月用上N多个案例来实践,这样之后,我觉得才是真的入门了。 书中的代码又是一段一段的...
Natural Language Processing (Almost) from Scratch
"FromScratch_图像处理"项目就是这样一个实例,它包含了图像分割和边缘检测等基础但关键的技术。接下来,我们将深入探讨这些知识点。 首先,我们要了解什么是图像处理。图像处理是计算机科学的一个分支,主要涉及对...
Linux From Scratch ,从头做一遍Linux系统(从最基本的系统套件开始编译),是让新手更快精通Linux的快速通道。
Current-Best-Practices-for-Training-LLMs-from-Scratch-Final.pdf
linux from scratch 是学习linux的有力助手
it’s a step-by-step guide for any person who wants to start learning Artificial Intelligence and Data Science from scratch. It will help you in preparing a solid foundation and learn any other high-...
LFS──Linux from Scratch,就是一种从网上直接下载源码,从头编译LINUX的安装方式。它不是发行版,只是一个菜谱,告诉你到哪里去买菜(下载源码),怎么把这些生东西( raw code) 作成符合自己口味的菜肴──个性化...