Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Programming \ Struts2 dynamic call DMI and error Solution     - Use in Linux ipmitool tool (Linux)

- Profile Linux users login shell and login to read (Linux)

- Ubuntu 14.04 + xRDP + Xfce implement Windows Remote Desktop Connection (Linux)

- 22 Port weak passwords and SSH connection program of the Linux server (Linux)

- Hadoop safe hftp (Server)

- To restore the last time applications running when Ubuntu user log in again (Linux)

- Print Linux system error codes (Linux)

- How MAT Android application memory leak analysis (Programming)

- Struts2 interceptor simulation (Programming)

- Linux System Administrator Network Security Experience (Linux)

- Linux kernel source tree to establish load module hello (Linux)

- QEMU image file used: qcow2 and raw (Linux)

- Deep understanding of C # generics (Programming)

- Iptables application layer plug (Linux)

- Zend Studio PHP syntax color scheme to export (Linux)

- Delete specific files using bash directory under Linux (Linux)

- To install and use Docker under linux (Server)

- Using monitoring tool dsniff (Linux)

- ORA-4031 error Solution (Database)

- Use smem visual display Linux memory usage (Linux)

  Struts2 dynamic call DMI and error Solution
  Add Date : 2018-11-21      
  In Strust2 the action can define your own way, there are two ways to call a method, one way is struts.xml specified method to indicate the need to use the method, but this method disadvantage is that if there are many ways you Action in the to configure many times, this is very complicated, another method is to use a dynamic method invocation DMI.

To take a simple example -

For example, there LoginAction add, dell method,

1, the configuration file struts.xml

1 < package name = "default" extends = "struts-default">
2 < action name = "login" class = "com.action.loginAction">
3 < result name = "add"> / add.jsp < / result>
4 < result name = "dell"> / dell.jsp < / result>
5 < / action>
6 < / package>

2, the preparation method and add in loginAction the dell methods:

public String add ()
  return "add";
public String dell ()
  return "dell";

3, used in the link! Dynamic call the desired method:

< a href="login!add"> call the add method < /a>
< a href="login!dell"> call dell method < /a>

Common mistakes:

 There is no Action mapped for namespace [/ XXX] and action name [xxx! Xxx] associated with context path [/ xxx_method].


 The default is such Struts.xml

< Constant name = "struts.enable.DynamicMethodInvocation" value = "false" />

 We will be wrong in the address bar exclamation dynamic invocation method, we only need to change this sentence to

  < ! - Open the Struts DMI ->

 < Constant name = "struts.enable.DynamicMethodInvocation" value = "true" />
- Linux Security Raiders SSH tools SCP uses examples to explain in detail (Linux)
- 12 Linux Process Management Commands (Linux)
- DB2 table space is redirected to restore the database combat (Database)
- Exploring the Android Listview display confusion (Programming)
- C # mobile side and PC-side data exchange (Database)
- Several reasons MySQL garbled (Database)
- Ubuntu 14.04 installation configuration GNOME Classic interface (Linux)
- Zabbix configure DataGuard monitoring (Database)
- Github inventory objects Algorithm (Linux)
- Using open source software to build XWiki Wiki system installed within the company (Linux)
- Gentoo: existing preserved libs problem solving (Linux)
- Advanced permissions Linux file system settings (Linux)
- Oracle 11g How dataguard master repository to Oracle single instance data recovery (Database)
- Security Configuration SQL Server 2000 database tutorial (Linux)
- Ubuntu Server (Ubuntu 14.04 LTS 64-bit) installation libgdiplus 2.10.9 error solution (Linux)
- C language Bubble Sort - integer sort (Programming)
- Boost notes --Thread - problems encountered in the initial use on Ubuntu (Programming)
- The Linux C truncate function clears the file notes (Programming)
- Linux mount command Detailed (Linux)
- Zabbix API and PHP configuration (Server)
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.