freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

外文文獻(xiàn)翻譯計(jì)算機(jī)科學(xué)與技術(shù)學(xué)生信息管理系統(tǒng)中英文對(duì)照-在線瀏覽

2025-02-06 12:04本頁(yè)面
  

【正文】 nForm, the framework default is session scope. To make request the default, see section . Since Struts Since Struts 200 CHAPTER 7 Designing with ActionMappings The validate property An important step in the lifecycle of an ActionForm is to validate its data before offering it to the business layer. When the validate property for a mapping is true, the ActionServlet will call the ActionForm’s validate method. If validate returns false, the request is forwarded to the resource given by the input property. Often, developers will create a pair of mappings for each data entry form. One mapping will have validate set to false, so you can create an empty form. The other has validate set to true and is used to submit the pleted form. NOTE Whether or not the ActionForm validate method is called does not relate to the ActionServlet’s validating property. That switch controls how the Struts configuration file is processed. The input property When validate is set to true, it is important that a valid path for input be provided. This is where control will pass should the ActionForm validate method return false. Often, this is the address for a presentation page. Sometimes it will be another Action path (with validate set to false) that is required to generate data objects needed by the page. NOTE The input path often leads back to the page that submitted the request. While it seems natural for the framework to return the request to where it originated, this is not a simple task in a web application. A request is often passed from ponent to ponent before a response is sent back to the browser. The browser only knows the path it used to retrieve the input page, which may or may not also be the correct path to use for the input property. While it may be possible to try and generate a default input 9 page based on the HTTP referrer attribute, the Struts designers deemed that approach unreliable. inputForward In Struts , the ActionMapping input property is always a literal URI. In Struts , it may optionally be the name of an ActionForward instead. The ActionForward is retrieved and its path property is used as the input property. This can be a global or local ActionForward. To use ActionForwards here instead of literal paths, set the inputForward attribute on the controller element for this module to true: Since Struts ActionMapping properties 201 controller inputForward=true For more about configuring Struts, see chapter 4. For more about ActionForwards, see chapter 6. The parameter property The generic parameter property allows Actions to be configured at runtime. Several of the standard Struts Actions make use of this property, and the standard Scaffold Actions often use it, too. The parameter property may contain a URI, the name of a method, the name of a class, or any other bit of information an Action may need at runtime. This flexibility allows some Actions to do double and triple duty, slashing the number of distinct Action classes an application needs on hand. Within an Action class, the parameter property is retrieved from the mapping passed to perform: parameter = ()。 The parameter property for your mapping then bees just another query string, because you might use it elsewhere in the Struts configuration. stringTokenizer. Another simple approach is to delimit the parameters using the token of your choice—such as a ma, colon, or semicolon—and use the StringTokenizer to read them back: StringTokenizer ining = new StringTokenizer((),。 int i = 0。 while (()) { parameters[i++] = ().trim()。 This does not affect how the properties are written by the tag extensions. It affects how the autopopulation mechanism perceives them in the request. Nested ponents 203 The unknown ActionMapping While surfing the Web, most of us have encountered the dreaded 404— page not found message. Most web servers provide some special features for processing requests for unknown pages, so webmasters can steer users in the right direction. Struts offers a similar service for ActionMapping 404s—the unknown ActionMapping. In the Struts configuration file, you can specify one ActionMapping to receive any requests for an ActionMapping that would not otherwise be matched: action name=/debug forward=/pages// When this option is not set, a request for an ActionMapping that cannot be matched throws 400 Invalid path /notHere was requested Note that by a request for an ActionMapping, we mean a URI that matches the prefix or suffix specified for the servlet (usually /do/* or *.do). Requests for other URI patterns, good or bad, will be handled by other servlets or by the container: 12 /do/notHere (goes to the unknown ActionMapping) / (goes to the container) Nested ponents The ActionMapping properties are helpful when it es to getting an Action to run a business operation. But they tell only part of the story. There is still much to do when the Action returns. An Action may have more than one oute. We may need to register several ActionForwards so that the Action can take its pick. Local forwards In the normal course, an ActionMapping is used to select an Action object to handle the request. The Action returns an ActionForward that indicates which page should plete the response. The reason we use ActionForwards is that, in practice, presentation pages are either often reused or often changed, or both. In either case, it is good practice to encapsulate the page’s location behind a logical name, like “success” or “failure.” The ActionForward object lets us assign a logical name to any given URI. 204 CHAPTER 7 Designing with ActionMappings Of course, logical concepts like success or failure are often relative. What represents success to one Action may represent failure to another. Each Action Mapping can have it
點(diǎn)擊復(fù)制文檔內(nèi)容
研究報(bào)告相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1