Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Programming \ Struts2 Result Types     - Configuring Allatori code confusion when developing general Java applications in NetBeans (Programming)

- Linux installed and tested the deployment of Kafka distributed cluster (Server)

- Ubuntu dual-card system configuration method (Server)

- Linux how to view the graphics models notebook (Linux)

- Linux at command (Linux)

- VMWare virtual machine without rebooting way to add virtual disk (Linux)

- Setting up Linux machine through a proxy firewall (Linux)

- Under Ubuntu on how to use iptables firewall (Linux)

- osprofiler use OpenStack Cinder Lane (Server)

- Linux top command to get started (Linux)

- Install JDK 1.7 + Eclipse in CentOS 6.4 in (Linux)

- How to disable UEFI to install Linux on Win8 (Linux)

- Hibernate4 The Hello World (basic environmental structures) (Programming)

- Oracle Client + PL SQL Developer enables remote access to the Oracle database (Database)

- XP virtual machine under VirtualBox solve occupy 100% CPU problem (Linux)

- Zorin OS: Linux novice most personal desktop system should be used (Linux)

- Build ftp server under CentOS 6.5 (Server)

- How to use the Linux terminal Git commands (Linux)

- CentOS installation of the ftp (Linux)

- After installing minimize RHEL / CentOS 7 we need to do (Linux)

 
         
  Struts2 Result Types
     
  Add Date : 2018-11-21      
         
         
         
  In struts-default.xml struts2-core-2.0.11.2.jar root directory is configured to provide a range of the result type struts2
struts2 result type implements the interface com.opensymphony.xwork2.Result
Supported type Result type:
chain: chain for processing Action
chart: Integration JFreeChart type of results
dispatcher: to turn the page, usually of the JSP
 freemaker: Processing FreeMarker template
httpheader: Results of the type of behavior control special HTTP
jasper: for JasperReports integration result type
jsf: JSF integration result type
redirect: redirect to a URL
 redirect-action: redirected to an Action
 stream: Send InputSream objects to the browser, typically used to handle file downloads, data can also be used to return AJAX
tiles: Tiles with the result of the integration type
velocity: Velocity template processing
xslt: handle XML / XLST template
plaintext: displays the original contents of the file, such as source code files

dispatcher result type as the default result type is used to return a view of resources (such as: jsp)
 Xml Code:

< Result name = "success"> / main.jsp < / result>
 < Result name = "success"> / main.jsp < / result>
Written above uses two default, the complete wording is:
  < Result name = "success" type = "dispatcher">
      < Param name = "location"> / maini.jsp < / param>
 < / Result>
 location can be a page, not another action (available type = "chain" to solve).

redirect result type is used to redirect to a page, another action or a URL.
Xml Code:

< Result name = "success" type = "redirect"> aaa.jsp < / result>
 < Result name = "success" type = "redirect"> bbb.action < / result>
 < Result name = "success" type = "redirect"> www.baidu.com < / result>

redirect-action type of results using ActionMapper ActionMapperFactory provided to redirect the request to another action
 Xml Code:

< Result name = "err" type = "redirect-action">
    < Param name = "actionName"> Action name redirected < / param>
      < Param name = "namespace"> Redirect Action where the namespace < / param>
 < / Result>
 redirect and redirect-action type two results in the use and in fact there is no difference, but the wording is different.

chain is used to connect several related action together to accomplish a function.
Xml Code:

< Action name = "step1" class = "test.Step1Action">
      < Result name = "success" type = "chain"> step2.action < / result>
 < / Action>
 < Action name = "step2" class = "test.Step2Action">
 < Result name = "success"> finish.jsp < / result>
 < / Action>
The action in the chain belong to the same http request to share a ActionContext
    
 plaintextj result type is used to display the source code directly on the page

Xml Code:

< Result name = "err" type = "plaintext">
    < Param name = "location"> specific location < / param>
    < Param name = "charSet"> character specifications (such as GBK) < / param>
 < / Result>
     
         
         
         
  More:      
 
- RHEL 7.1 compile and install Ganglia 3.7.1 (Server)
- Python virtual environment: Virtualenv (Linux)
- Samba public folder permissions (Server)
- Ubuntu install Lighttpd + Mono support .net (Linux)
- MySQL Data Types (Database)
- Quick paging ROW_NUMBER conducted (Database)
- Java singleton mode (Singleton mode) (Programming)
- MySQL query performance comparison of a single truth (Database)
- Java reflection summary (Programming)
- CentOS 7.0 Close firewall is enabled by default iptables firewall (Linux)
- Perl loop (Programming)
- To install Docker under CentOS7 (Linux)
- Ubuntu 14.04 Trusty Tahr User How to install Banshee 2.9.1 (Linux)
- Brief Linux commands (Linux)
- Oracle 11g logical standby achieve BI needs (Database)
- Alternative methods of intrusion bundled executable file new thinking (Linux)
- Linux Basic Course: Install the software from source code (Linux)
- Go Languages Reviews (Programming)
- Linux security settings Basics (Linux)
- Understanding and Memcached MongoDB arbitration node, Zookeeper, Redis Recovery Programme Thoughts (Database)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.