1.用途:使struts2配置文件更简单。
2.下载:附件
3.如何使用:直接放在lib下。
4.如何修改struts.xml:
使用前:
<package name="xxn" extends="struts-default" >
<action name="user" class="test">
<result name="input">/user-input.jsp</result>
<result name="list">/user-list.jsp</result>
<result name="show">/user-show.jsp</result>
<result name="register">/user-register.jsp</result>
</action>
</package>
使用后:
<package name="xxn" extends="struts-default" >
<action name="user" class="test">
<result type="redirect-action">user</result>
</action>
</package>
5.说明:使用这个插件后,你只要配置<result type="redirect-action">user</result>,他就会自动的跳转到相应的页面。对应方式是:例如http://localhost/test/user!input.action
,则自动跳转到user-input.jsp,也就是说程序自动跳转到action名-方法名.jsp
分享到:
相关推荐
struts2-codebehind-plugin-2.3.1.2.jar
struts2-codebehind-plugin-2.1.6.jar
6. **struts2-codebehind-plugin-2.0**:Struts2是一个基于MVC设计模式的Web应用框架,用于简化Java EE Web开发。CodeBehind插件可能是Struts2的一个扩展,它可能提供了将业务逻辑代码与视图分离的能力,增强代码的...
struts2-codebehind-plugin-2.3.30.jar, struts2-config-browser-plugin-2.3.30.jar, struts2-convention-plugin-2.3.30.jar, struts2-core-2.3.30.jar, struts2-dojo-plugin-2.3.30.jar, struts2-dwr-plugin-2.3.30...
struts2.1.6-codebehind-plugin.api.chm 自己打包 javadoc文档
struts2-codebehind-plugin-2.3.15.3.jar struts2-config-browser-plugin-2.3.15.3.jar struts2-convention-plugin-2.3.15.3.jar struts2-core-2.3.15.3.jar struts2-core-2.3.31.jar struts2-dojo-plugin-2.3.15.3....
Struts开始使用convention-plugin代替codebehind-plugin来实现struts的零配置,使用Convention插件,你需要此JAR文件
struts2-core-2.2.3.jar struts2-dojo-plugin-2.2.3.jar struts2-codebehind-plugin-2.2.3.jar struts2-config-browser-plugin-2.2.3.jar struts2-convention-plugin-2.2.3.jar 等等。。。
通过结合使用Zero Config与CodeBehind插件,开发者可以在很大程度上减少Struts2项目中的配置负担,使代码更加简洁易读。这两个插件的出现进一步提高了Struts2框架的灵活性和易用性,使得开发过程更加高效。
从Struts2的2.1版本开始,Convention Plugin被引入,旨在替代原有的Codebehind Plugin,实现Struts2框架下的零配置理念。这一转变简化了应用程序的开发流程,通过遵循一系列预定义的规则和约定,开发者可以无需编写...
`struts2-codebehind-plugin-2.3.8.jar`是Struts 2的一个插件,名为CodeBehind插件。这个插件允许开发者将Action类的业务逻辑代码和视图逻辑代码分离,使得代码更加模块化和易于管理。CodeBehind插件通过创建一个...
从struts2.1开始,struts2不再推荐使用Codebehind作为零配置插件,而是改为使用Convention插件来支持零配置,和Codebehind相比,Convention插件更彻底,该插件完全抛弃配置信息,不仅不需要是使用struts.xml文件进行...
Struts2 Convention Plugin 是从 Struts2.1 版本开始引入的一个插件,它的主要目标是实现 Struts2 框架的零配置。通过约定优于配置的原则,开发者可以更加专注于业务逻辑,减少大量的 XML 配置工作。以下是 ...
### Struts2-Convention插件使用详解 #### 引言 自Struts2.1版本起,Convention插件被引入,旨在替代原有的Codebehind插件,实现框架内的零配置理念。这一插件的设计思想围绕着减少XML配置的依赖,通过代码结构与...
6. **代码隐藏和分层架构**:ASP.NET鼓励使用代码隐藏(CodeBehind)模式,将界面逻辑和业务逻辑分离,提高了代码的可维护性和可重用性。 7. **部署和安全性**:.NET Framework 2.0提供了强大的部署工具和安全机制...
首先,`convention-plugin`替代了之前的`codebehind-plugin`,主要目标是减少对XML配置的依赖。尽管名为“零配置”,但其实质是通过一套预设的规则来自动配置Action和结果页面的映射,而不是完全不需要任何配置。 1...
Struts2的“零配置”特性由struts2-codebehind-plugin-2.1.2.jar插件支持,使用时记得将其拷入WEB-INF/lib下; 如果用的是Annotation的Struts2,就要将struts.xml去掉,否则即使将struts.xml中的内容注销,也会报错;
- `struts2-codebehind-plugin-2.1.6.jar` - `struts2-core-2.1.6.jar` - `struts2-spring-plugin-2.1.6.jar` - `xwork-2.1.2.jar` - `ognl-2.6.11.jar` - `freemarker-2.3.13.jar` - `commons-fileupload-...