ImageVerifierCode 换一换
格式:DOCX , 页数:15 ,大小:29.61KB ,
资源ID:9041990      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/9041990.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(网上文件管理系统论文英文.docx)为本站会员(b****7)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

网上文件管理系统论文英文.docx

1、网上文件管理系统论文英文Exploring the Struts architectureThis article covers_ Introducing application frameworks, MVC, and Model 2_ Understanding how Struts works_ Using the Struts control flow_ Exploring the strengths and weaknesses of Struts1 Talking the talkThis article explores the Struts framework in depth

2、 and highlights the benefits Struts can bring to your development efforts. We believe that once you can “talk the talk” of web architecture and design, you will be better equipped to use Struts with your own applications.With a sound overview of the Struts architecture in place, we outline the Strut

3、s control flow and the way it handles the request-response event cycle. A good understanding of this process makes it much easier to create applications that make the best use of the framework.Choosing a web application framework should not be a casual decision. Many people will use this book, and e

4、specially this chapter, as part of evaluating Struts for their project. Accordingly, we conclude this chapter with a candid look at the strengths and weaknesses of the Struts framework and address concerns regarding overall performance. Struts is designed for professional developers. To makeinformed

5、 decisions, professionals need to be aware of both a tools capabilities and its limitations.2 Why we need StrutsTodays web applications are critical components of the corporate mission. As always,development teams need to build applications in record time, but they have to build them right and build

6、 them to last. Java web developers already have utilities for building presentation pages, such as JavaServer Pages and Velocity templates. We also have mechanisms for handlingdatabasesJDBC and Enterprise JavaBeans (EJBs), for example. But what do we use to put these components together? We have the

7、 plumbing and the drywall what else do we need?2.1 One step back, three steps forwardIn the late 1970s, when graphical user interfaces (GUIs) were being invented,software architects saw applications as having three major parts: the part that Why we need Struts 31 manages data, the part that creates

8、screens and reports, and the part that handles interactions between the user and the other subsystems Ooram. In the early 1980s, the ObjectWorks/Smalltalk programming environment introduced this triumvirate as a development framework. In Smalltalk 80 parlance, the data system is dubbed the Model, th

9、e presentation system is called the View, and the interaction system is the Controller. Many modern development environments, including Javas Swing, use this Model/View/Controller (MVC) architecture (see figure 2.1) as the foundation of their own frameworks. Java web developers already have capable

10、tools, such as JDBC and JSP, for consultingthe Model and creating the View, but wheres the Controller for our webapplications?2.2 Enter StrutsThe centerpiece of Struts is an MVC-style Controller. The Struts Controller bridges the gap between Model and View. The framework also includes other missing

11、pieces developers need to write scalable, leading-edge web applications. Struts is a collection of “invisible underpinnings” that help developers turn raw materials like databases and web pages into a coherent application.2.3 Struts controller componentsThe Struts controller is a set of programmable

12、 components that allow developers to define exactly how their application interacts with the user. These components hide nasty, cumbersome implementation details behind logical names. Developers can program these details once, then go back to thinking in terms of what the program does rather than ho

13、w it does it. Users interact with a web application through hyperlinks and HTML forms. The hyperlinks lead to pages that display data and other elements, such as text and images. The forms generally submit data to the application via some type of custom action.As shown in figure 2.2, Struts provides

14、 components that programmers can use to define the hyperlinks, forms, and custom actions that web applications use to interact with the user. We used these components to build a starter application in chapter 1. In chapter 3, we walk through using these components to build another simple application

15、. Then, in chapter 4, we provide a detailed overview of configuring these components. Later chapters provide more detail about putting each component to use within your application. In part 4 we demonstrate using the components in the context of working applications. But, since this chapter is the a

16、rchitectural overview, lets go ahead and introduce the major Struts components now.NOTE The Struts components are configured via XML.HyperlinksTo the application developer, a hyperlink is a path to some resource in the application.This may be a web page or a custom action. It may also include specia

17、l parameters. In Struts, developers can define a hyperlink as an ActionForward. These objects have a logical name and a path property. This lets developers set the path and then refer to the ActionForward by name. ActionForwards are usually defined in an XML configuration file that Struts reads when

18、 the web application loads. Struts uses the XML definitions to create the Struts configuration, which includes a list of ActionForwards. The XML element that would create an ActionForward for a welcome hyperlink might look like this:This element would create an ActionForm JavaBean with its name prop

19、erty set to welcome and its path property set to /pages/index.jsp. JSP pages and other components can then refer to the welcome forward. The Struts framework will look up the welcome ActionForward bean and retrieve the path to complete the hyperlink. This allows developers to change the destinationo

20、f a link without changing all the components that refer to that link. In most web applications, details like this are hardcoded into JSP and Java code, making changes difficult and prone to error. In a Struts application, these details can be changed throughout the application without touching a sin

21、gle page or Java class.For more about ActionForwards, see chapter 6.HTML formsThe web protocols, HTTP and HTML, provide a mechanism for submitting datafrom a form but leave receiving the data as an exercise for the developer. The Struts framework provides an ActionForm class, which is designed to ha

22、ndle input from an HTML form, validate the input, and redisplay the form to the user for correction (when needed), along with any corresponding prompts or messages. ActionForms are just JavaBeans with a couple of standard methods to manage the validation and revision cycle. Struts automatically matc

23、hes the JavaBean properties with the attributes of the HTML controls. The developer defines the Action-Form class. Struts does the rest.This class will automatically populate the username field from a form with anHTML form element of the same name, as shown here:public final class LogonForm extends

24、ActionForm private String username = null;public String getUsername() return (this.username);public void setUsername(String username) this.username = username;Other properties would be added for each field of the form. This lets other components get what they need from a standard JavaBean, so everyo

25、ne does not have to sift through an HTTP request. The ActionForm classes are created using normal Java classes. The Struts configurationrefers to the ActionForm classes through a set of descriptors: the and elements. The elements are descriptors that the framework uses to identify and instantiate th

26、e ActionForm objects, as shown here:The Struts configuration lists the ActionForm beans it uses and gives the Action-Form classes a logical name to use within the application. 1.0 vs 1.1 In Struts 1.1 the ActionForm can also use a Map (java.util.Map) to store the attribute names rather than define i

27、ndividual properties. A new type of JavaBean, the DynaBean, can also be used with Struts 1.1 and later. You can specify the properties for a DynaActionForm by using an XML element. In effect, this does let you define ActionForms in the Struts configuration file.Custom actionsAn HTML form uses an act

28、ion parameter to tell the browser where to send the forms data. The Struts framework supplies a corresponding Action class to receive such data. The framework automatically creates, populates, validates, and finally passes the appropriate ActionForm to the Action object. The Action can then get the

29、data it needs directly from the ActionForm bean. Heres an example:public final class LogonAction extends Action public ActionForward perform(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response)throws IOException, ServletException MyForm myForm = (MyForm) for

30、m;/ .return mapping.findForward(continue);An Action concludes by returning an ActionForward object to the controller. This allows the Action to choose a definition using logical names, like continue or cancel, rather than system paths.To ensure extensibility, the controller also passes the current r

31、equest and response object. In practice, an Action can do anything a Java Servlet can do.In addition to the ActionForward, ActionForm, and Action objects, the Struts controller layer provides several other specialized components, including Action- Mappings and the ActionServlet. Struts also supports

32、 localizing your application from the controller layer.ActionMappingsIn a web application, every resource must be referred to through a Uniform Resource Identifier (URI). This includes HTML pages, JSP pages, and any custom actions. To give the custom Actions a URI, or path, the Struts framework provides an ActionMapping object. Like the ActionForwards and ActionForms, the mappings are usually

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1