struts2
qq_26847293
这个作者很懒,什么都没留下…
展开
-
struts2采用convention-plugin实现零配置
Struts2开始使用convention-plugin代替codebehind-plugin来实现struts的零配置。使用Convention插件,你需要将其JAR文件放到你应用的WEB-INF/lib目录中,你也可以在你Maven项目的POM文件中添加下面包依赖<dependency> <groupId>org.apache.struts</groupId> <artifact转载 2015-09-09 11:35:09 · 421 阅读 · 0 评论 -
el表达式跟ognl表达式的区别
EL表达式:单纯在jsp页面中出现,是在四个作用域中取值:page,request,session,application.如果在struts环境中,它除了在上面的四个作用域取值外,还能从值栈(valuestack)中取值.特点1:${name},name在值栈中的查找顺序是:先从对象栈中取,取到终止,否则,向map中取。特点2:在对象栈的查找顺序是,先从model中找是否有name这个属性转载 2016-04-08 10:06:01 · 306 阅读 · 0 评论 -
Struts 2 Namespace configuration example and explanation
Struts 2 Namespace is a new concept to handle the multiple modules by given a namespace to each module. In addition, it can used to avoid conflicts between same action names located at different module转载 2015-09-17 09:50:52 · 502 阅读 · 0 评论 -
Struts 2 @ResultPath annotation example
In Struts 2, @ResultPath annotation is used to control where Struts 2 will find the the stored results or JSP pages. By default, it will find the result pages from the “WEB-INF/content/” folder.No idea转载 2015-09-17 09:30:30 · 675 阅读 · 0 评论 -
Working with Struts 2 actions
In Struts 2, you’ll spend most of your time working with actions. The action class contains business logic, retrieve resource bundle, hold the data, validation, and select the view result page that sho转载 2015-09-17 10:14:14 · 243 阅读 · 0 评论 -
How to remove the action suffix extension in Struts 2
In Struts 2, all action class has a default suffix .action extension. For example,<struts> <package name="default" namespace="/" extends="struts-default"> <action name="SayStruts2"> <resu转载 2015-09-17 09:57:51 · 587 阅读 · 0 评论 -
Struts 2 – Include multiple Struts configuration files
Struts 2 comes with “include file” feature to include multiple Struts configuration files into a single unit.Single Struts configuration fileLet’s see a bad Struts 2 configuration example.struts.xml<?x转载 2015-09-17 09:34:33 · 279 阅读 · 0 评论 -
Struts 2 Hello World Example
In this example, we show you how to create a hello world example in Struts 2.The following libraries or tools are used :Maven 3Eclipse 3.7Struts 2.3.1.21. Final project structureLet review the fina转载 2015-09-17 09:12:58 · 354 阅读 · 0 评论 -
Struts 2 Hello World Example
In this example, we show you how to create a hello world example in Struts 2.The following libraries or tools are used :Maven 3Eclipse 3.7Struts 2.3.1.21. Final project structureLet review the fina转载 2015-09-17 09:43:51 · 305 阅读 · 0 评论 -
Struts 2 – Development mode example
In Struts 2 development, this should be the first configurable value to learn. To enable the Struts 2 development mode, you can significantly increase your Struts 2 development speed by giving auto con转载 2015-09-17 09:55:14 · 1470 阅读 · 0 评论 -
Struts 2 Hello World Annotation Example
In this tutorials, it will reuse the previous Strust 2 Hello World (XML version) example, and convert it into annotation version.Struts 2 Annotation ConceptThe Struts 2 annotation is supported by Strut转载 2015-09-17 09:27:36 · 384 阅读 · 0 评论 -
Struts 2 Namespace configuration example and explanation
Struts 2 Namespace is a new concept to handle the multiple modules by given a namespace to each module. In addition, it can used to avoid conflicts between same action names located at different module转载 2015-09-11 14:54:17 · 233 阅读 · 0 评论 -
Struts 2 Hello World Annotation Example
Struts 2 Annotation ConceptThe Struts 2 annotation is supported by Struts 2 convention plugin, So, you have to understand the magic behind its “Scanning Methodology” and “Naming Converter” mechanism.1.转载 2015-09-11 16:25:55 · 288 阅读 · 0 评论 -
Struts 2 @ResultPath annotation example
In Struts 2, @ResultPath annotation is used to control where Struts 2 will find the the stored results or JSP pages. By default, it will find the result pages from the “WEB-INF/content/” folder.No idea转载 2015-09-11 16:47:11 · 268 阅读 · 0 评论 -
Struts 2 Hello World Example
In this example, we show you how to create a hello world example in Struts 2.The following libraries or tools are used :Maven 3Eclipse 3.7Struts 2.3.1.21. Final project structureLet review the fina转载 2015-09-11 14:46:19 · 345 阅读 · 0 评论 -
Struts 2中的constant详解
通过对这些属性的配置,可以改变Struts 2 框架的一些默认行为,这些配置可以在struts.xml文件中完成,也可以在struts.properties文件中完成。<constant name="struts.i18n.encoding" value="UTF-8" /> 指定Web应用的默认编码集,相当于调用HttpServletRequest的setCharacterEncoding方法转载 2015-09-09 14:52:05 · 248 阅读 · 0 评论 -
用ognl还是jstl+el?
Struts推荐使用功能更加强大的Ognl表达式。El可以完成的功能,Ognl也可以,El不能完成的功能,Ognl也可以。 但是有些程序员,已经习惯了jsp中结合jstl和el表达式,我们可以有两种解决方案: 1.使用struts2自带的标签库,jsp中使用ognl进行操作。 2.不是用struts2自带的标签库,jsp直接结合jstl+el进行操作。 jsp2.0中默认启动对el表达式的支转载 2016-04-08 10:19:54 · 518 阅读 · 0 评论