社区
Java EE
帖子详情
为什么用struts1替代servlet
小白_1
2016-08-31 09:38:53
请各位老师指点,为什么要用struts1替代servlet?我怎么没有看到有啥不同或者更好?感觉就是用一个一个action代替了一个一个servlet而已。
...全文
209
5
打赏
收藏
为什么用struts1替代servlet
请各位老师指点,为什么要用struts1替代servlet?我怎么没有看到有啥不同或者更好?感觉就是用一个一个action代替了一个一个servlet而已。
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
5 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
小白_1
2016-09-20
打赏
举报
回复
我知道struts1已经过时,我只是想获取思想,即框架代替servlet的原因。感谢同行指点。
Alvis_you
2016-09-01
打赏
举报
回复
最快的开发肯定是直接servlet,开发容易但是维护太难,为了好维护肯定是用mvc框架了,后面接手也好接手。
小白_1
2016-09-01
打赏
举报
回复
我是初学者,我是不用,但我想搞清楚思想。希望理解。另外请问如何获得分数,比如花钱买之类的
江城老金
2016-08-31
打赏
举报
回复
现在都什么时代了 还有用struts1的,换springmvc吧
小灯光环
2016-08-31
打赏
举报
回复
struts是一个MVC框架(不过现在springmvc用的更多一些),提供了搭建整个mvc需要的各种支持与整合~ 而servlet在web项目中只算mvc中的一层controller层,struts2最强大的地方是他的s标签库,用起来比jstl强大很多~ 还有struts的拦截器、国际化、校验等等很多特性和功能~ 简单将,servlet是java web最基础的一种规范,而struts、springmvc这些就是封装之后的功能较为完整的框架了~用起来更方便功能也更完善
javaWeb_struts2框架实现简单用户注册登录
基于javaWeb MVC模式,借助struts2框架编写,实现用户简单的注册与登录功能。 1.本demo严格按照MVC的分层模式采用myeclipse编写,可直接运行,服务器为tomcat,数据库为mysql。 2.数据库操作使用c3p0连接池和dbtuils组件,对表的CURD,二者搭配感觉很easy,没有使用hibernate。 3.控制器采用action开发,替代传统的
servlet
,直接跳转页面返回一个字符串即可,需配置struts.xml对应的jsp。 4.struts2,可以直接对表单提交的数据封装成对象,简洁!当然需要在web.xml中配置核心filter—strutsPrepareAndExecuteFilter.
Struts课堂笔记.rar--struts2的struts.properties配置文件详解
struts.action.extension The URL extension to use to determine if the request is meant for a Struts action 用URL扩展名来确定是否这个请求是被用作Struts action,其实也就是设置 action的后缀,例如login.do的'do'字。 struts.configuration The org.apache.struts2.config.Configuration implementation class org.apache.struts2.config.Configuration接口名 struts.configuration.files A list of configuration files automatically loaded by Struts struts自动加载的一个配置文件列表 struts.configuration.xml.reload Whether to reload the XML configuration or not 是否加载xml配置(true,false) struts.continuations.package The package containing actions that use Rife continuations 含有actions的完整连续的package名称 struts.custom.i18n.resources Location of additional localization properties files to load 加载附加的国际化属性文件(不包含.properties后缀) struts.custom.properties Location of additional configuration properties files to load 加载附加的配置文件的位置 struts.devMode Whether Struts is in development mode or not 是否为struts开发模式 struts.dispatcher.parametersWorkaround Whether to use a
Servlet
request parameter workaround necessary for some versions of WebLogic (某些版本的weblogic专用)是否使用一个
servlet
请求参数工作区(PARAMETERSWORKAROUND) struts.enable.DynamicMethodInvocation Allows one to disable dynamic method invocation from the URL 允许动态方法调用 struts.freemarker.manager.classname The org.apache.struts2.views.freemarker.FreemarkerManager implementation class org.apache.struts2.views.freemarker.FreemarkerManager接口名 struts.i18n.encoding The encoding to use for localization messages 国际化信息内码 struts.i18n.reload Whether the localization messages should automatically be reloaded 是否国际化信息自动加载 struts.locale The default locale for the Struts application 默认的国际化地区信息 struts.mapper.class The org.apache.struts2.dispatcher.mapper.ActionMapper implementation class org.apache.struts2.dispatcher.mapper.ActionMapper接口 struts.multipart.maxSize The maximize size of a multipart request (file upload) multipart请求信息的最大尺寸(文件上传用) struts.multipart.parser The org.apache.struts2.dispatcher.multipart.MultiPartRequest parser implementation for a multipart request (file upload) 专为multipart请求信息使用的org.apache.struts2.dispatcher.multipart.MultiPartRequest解析器接口(文件上传用) struts.multipart.saveDir The directory to use for storing uploaded files 设置存储上传文件的目录夹 struts.objectFactory The com.opensymphony.xwork2.ObjectFactory implementation class com.opensymphony.xwork2.ObjectFactory接口(spring) struts.objectFactory.spring.autoWire Whether Spring should autoWire or not 是否自动绑定Spring struts.objectFactory.spring.useClassCache Whether Spring should use its class cache or not 是否spring应该使用自身的cache struts.objectTypeDeterminer The com.opensymphony.xwork2.util.ObjectTypeDeterminer implementation class com.opensymphony.xwork2.util.ObjectTypeDeterminer接口 struts.serve.static.browserCache If static content served by the Struts filter should set browser caching header properties or not 是否struts过滤器中提供的静态内容应该被浏览器缓存在头部属性中 struts.serve.static Whether the Struts filter should serve static content or not 是否struts过滤器应该提供静态内容 struts.tag.altSyntax Whether to use the alterative syntax for the tags or not 是否可以用替代的语法替代tags struts.ui.templateDir The directory containing UI templates UI templates的目录夹 struts.ui.theme The default UI template theme 默认的UI template主题 struts.url.http.port The HTTP port used by Struts URLs 设置http端口 struts.url.https.port The HTTPS port used by Struts URLs 设置https端口 struts.url.includeParams The default includeParams method to generate Struts URLs 在url中产生 默认的includeParams struts.velocity.configfile The Velocity configuration file path velocity配置文件路径 struts.velocity.contexts List of Velocity context names velocity的context列表 struts.velocity.manager.classname org.apache.struts2.views.velocity.VelocityManager implementation class org.apache.struts2.views.velocity.VelocityManager接口名 struts.velocity.toolboxlocation The location of the Velocity toolbox velocity工具盒的位置 struts.xslt.nocache Whether or not XSLT templates should not be cached 是否XSLT模版应该被缓存
Struts in Action[文字版][中文]
书名:Struts in Action[文字版][中文](电子书) 格式:PDF 本书的目的是帮助Web应用开发者能够最好的使用 Struts web 应用框架。 Struts是一个开源软件,有助于开发者更加快速和容易地建立Web应用程序。Struts依靠绝大多数开发者已熟知的标准技术—比如 JavaBeans, Java
servlet
, 以及JavaServer Page (JSP)。通过基于标准的技术, “填空式”的软件开发方法,Struts可以减轻在创建新项目时那些令人抱怨的极费时间的工作。 1.介绍 2.深入Struts架构 3.构建一个简单应用 4.配置Struts组件 5.用ActionForm传递数据 6.连线ActionForward 7.设计ActionMapping 8.和女主角Action对象共舞 9.扩展Action
Servlet
10。显示动态内容 11.用Tiles开发应用 12.用户输入校验 13.本地化 14.在Struts中使用数据服务 15.Artinus:全力以赴实际应用 16.回家:迁移到Struts 1.1 17.VElocity:JSP的替代选择 http://itlnk.cn网站整理 书名:Struts in Action[文字版][中文](电子书) 格式:PDF 本书的目的是帮助Web应用开发者能够最好的使用 Struts web 应用框架。 Struts是一个开源软件,有助于开发者更加快速和容易地建立Web应用程序。Struts依靠绝大多数开发者已熟知的标准技术—比如 JavaBeans, Java
servlet
, 以及JavaServer Page (JSP)。通过基于标准的技术, “填空式”的软件开发方法,Struts可以减轻在创建新项目时那些令人抱怨的极费时间的工作。 1.介绍 2.深入Struts架构 3.构建一个简单应用 4.配置Struts组件 5.用ActionForm传递数据 6.连线ActionForward 7.设计ActionMapping 8.和女主角Action对象共舞 9.扩展Action
Servlet
10。显示动态内容 11.用Tiles开发应用 12.用户输入校验 13.本地化 14.在Struts中使用数据服务 15.Artinus:全力以赴实际应用 16.回家:迁移到Struts 1.1
基于struts2注册登录ActionContext.zip
struts2大量使用拦截器来处理请求,从而允许与业务逻辑控制器 与
servlet
-api分离,避免了侵入性(所谓侵入性就是指的这个架构设计出来的部件对系统的影响范围,标签库几乎可以完全替代JSTL的标签库,并且 struts2.x支持强大的ognl表达式。可用于软件开发课程作业。
轻量级J2EE企业应用实战(第3版)
《轻量级java ee企业应用实战(第3版)—struts 2+spring 3+hibernate整合开发》 第1章 java ee应用和开发环境 1 1.1 java ee应用概述 2 1.1.1 java ee应用的分层模型 2 1.1.2 java ee应用的组件 3 1.1.3 java ee应用的结构和优势 4 1.1.4 常用的java ee服务器 4 1.2 轻量级java ee应用相关技术 5 1.2.1 jsp、
servlet
3.0和javabean及替代技术 5 1.2.2 struts 2.2及替代技术 5 1.2.3 hibernate 3.6及替代技术 6 1.2.4 spring 3.0及替代技术 6 1.3 tomcat的下载和安装 7 1.3.1 安装tomcat服务器 8 1.3.2 配置tomcat的服务端口 9 1.3.3 进入控制台 10 1.3.4 部署web应用 12 1.3.5 配置tomcat的数据源 13 1.4 eclipse的安装和使用 15
Java EE
67,515
社区成员
225,878
社区内容
发帖
与我相关
我的任务
Java EE
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
复制链接
扫一扫
分享
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章