为什么用struts1替代servlet

小白_1 2016-08-31 09:38:53
请各位老师指点,为什么要用struts1替代servlet?我怎么没有看到有啥不同或者更好?感觉就是用一个一个action代替了一个一个servlet而已。
...全文
209 5 打赏 收藏 转发到动态 举报
写回复
用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这些就是封装之后的功能较为完整的框架了~用起来更方便功能也更完善
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[文字版][中文](电子书) 格式: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.扩展ActionServlet 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.扩展ActionServlet 10。显示动态内容 11.用Tiles开发应用 12.用户输入校验 13.本地化 14.在Struts中使用数据服务 15.Artinus:全力以赴实际应用 16.回家:迁移到Struts 1.1

67,515

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧