posts - 0,  comments - 0,  trackbacks - 0

               If you add a redirect element after to-view-id, then the JSP container terminates the current request and sends an HTTP redirect to the client. The redirect response tells the client which URL to use for the next page.

              Redirecting the page is slower than forwarding because another round trip to the browser is involved. However, the redirection gives the browser a chance to update its address field.

          Figure 3-8 shows how the address field changes when you add a redirection element, as follows:

          <navigation-case>
                
          <from-outcome>success</from-outcome>
                
          <to-view-id>/success.jsp</to-view-id>
                
          <redirect/>
          </navigation-case>

          Without redirection, the original URL (localhost:8080/javaquiz/index.faces) is unchanged when the user moves from the /index.jsp  page to the /success.jsp face. With redirection, the browser displays the new URL (localhost:8080/ javaquiz/success.faces).

          Tip

          Use the redirect element for pages that the user might want to bookmark.

                                                                    上文出自:《core JavaServer™ Faces, Second Edition》
          posted on 2007-12-11 18:09 *一凡* 閱讀(352) 評論(0)  編輯  收藏 所屬分類: JSF
          主站蜘蛛池模板: 梅州市| 呼玛县| 卢龙县| 桓台县| 绥中县| 和田县| 庆云县| 定西市| 东源县| 镇原县| 德钦县| 乐东| 天镇县| 法库县| 阳谷县| 桐乡市| 定远县| 武平县| 苍南县| 阜康市| 息烽县| 嘉禾县| 铁力市| 报价| 汕头市| 新乡市| 英吉沙县| 大埔县| 开原市| 巩义市| 措勤县| 泗阳县| 平顶山市| 顺平县| 松潘县| 咸阳市| 乌鲁木齐市| 浮梁县| 东阳市| 彰武县| 东至县|