Questions tagged [dmi]

Dynamic Method Invocation (DMI) is a feature of Struts2 framework that lets the "!" (bang) character invoke a method other than `execute`.

Dynamic Method Invocation (DMI) is a feature of Struts2 framework that lets the "!" (bang) character invoke a method other than execute. The "!" character added to the URL after the action name and followed by a method name to execute. The difference with the mapping actions in this way as the opposite where the action is mapped directly to the method in the action configuration the any other method could be executed regardless of the method configured or the method execute which is used by default.

This feature is configurable by the property or constant struts.enable.DynamicMethodInvocation which can take values true or false. By default this feature is enabled.

Since Struts 2.3, an option was added to restrict the methods that DMI can invoke. You can use the attribute strict-method-invocation="true" of the package tag. In this case Struts will reject any method that is not defined in the method attribute or allowed-methods of the action tag.

Documentation: http://struts.apache.org/docs/action-configuration.html#ActionConfiguration-DynamicMethodInvocation

30 questions
1
vote
2 answers

How to invoke a method on submit button in Struts 2 using convention plugin?

In the following piece of code about Struts action class, @Namespace("/admin_side") @ResultPath("/WEB-INF/content") // Default. public final class TestAction extends ActionSupport implements Serializable { private static final long…
Tiny
  • 27,221
  • 105
  • 339
  • 599
1
vote
1 answer

Codebehind plugin have access path as .action?

Can I able to access method as action in Struts 2 with Codebehind plugin? Since there is no struts.xml file and its works as action!method in the URL. Just I'm wondering to access a method How to use Struts tag on class? "@Action(name="action"),…
user2444474
  • 623
  • 8
  • 21
  • 40
0
votes
0 answers

error in a XAMPP-based BYOND DMI-to-PNG program

Fatal error: Uncaught Error: Call to undefined function imagecreatefrompng() in C:\xampp\htdocs\dmi2png\index.php:548 Stack trace: #0 {main} thrown in C:\xampp\htdocs\dmi2png\index.php on line 548 what does this mean and how do I fix it Tried to…
Addust
  • 1
0
votes
0 answers

Dynamic method invocation based on URL Param

I want to hit a URL such as /mysite/test?do_this?execution_method I want this to take me to the action method execution_method() via the following struts.xml action
Shane_S
  • 119
  • 2
  • 2
  • 9
0
votes
1 answer

How dmidecode decode /sys/firmware/dmi/tables/DMI

As the following pictures, the dmidecode -t1 -u command shows the raw info, and dmidecode -t1 shows the formatted info. But when I looking the [SMBIOS 3.1.1 specification][1], the "System Information (Type 1) structure" doesn't match the dmidecode…
yiya1989
  • 1
  • 2
0
votes
1 answer

Check if running on laptop or desktop chassis type in Python

I want to make a python script that checks a user's machine form factor (laptop or desktop), and then I would be able to use conditions like that: chassis_type = some_module.get_chassis_type() if chassis_type == 'laptop': print("You are out of…
Ashark
  • 643
  • 7
  • 16
0
votes
1 answer

How to invoke multiple methods from Struts 2.5 with SMI and when DMI is off

Right now we are using Struts 2.5 and I have Dynamic Method Invocation=true in Struts configuration file . And i have action mappings as below.
Sailaja
  • 9
  • 1
0
votes
2 answers

Python 2 subprocess (dmidecode) to a variable?

I'm running a dmidecode in linux to get the list of hardware information. What is the best way to read over the output and select certain bits of information? For example get the Product Name: part of the dmidecode? At the moment I'm writing the…
twigg
  • 3,753
  • 13
  • 54
  • 96
0
votes
0 answers

Ajax response on struts 2

I have a table that displays a collection using the iterator tag. Last column of each row has a tag that will trigger an ajax action call. The result targets a . My problem is that I would like to have the ajax response in the next column of the…
0
votes
0 answers

Editing DMICFG utility using .bat file?

I am trying to update system information using a batch file in DOS but when i am executing the file the information does not gets updated. The syntax that i have been using is DMICFG /type 01 04 "ECT " when executing through batch file this syntax…
user3639779
  • 79
  • 1
  • 9
0
votes
1 answer

How do I execute the decode -t 17 in Linux through Java?

I need to execute the decode -t 17 through Java.But it requires root permission.So I thought of executing su -i to change to root and then execute the decode command.But nothing happens.Please help: btnNewButton.addActionListener(new…
0
votes
1 answer

Action redirect is not working with list attribute after login in Struts 2

I have the following usecase that on Login a CustomerForm should be shown and a ListofCustomers which is retrieved from Database should be shown. I have written the following code in Struts 2 but my getCustomerList() in CustomerAction is not getting…
Rahul Jain
  • 115
  • 3
  • 12
0
votes
1 answer

JQuery Ajax form submit along with usual submit on the same form in Struts 2

Do Struts tags and work on same form? I have already Struts buttons , but now I have added . So, Struts 2 jQuery plugin button is working good, but Struts is not…
user2543737
  • 41
  • 3
  • 7
0
votes
2 answers

Configure different Action classes for two forms on one JSP in Struts 2

I have one JSP page which has two forms with submit buttons. How to configure different action class those two forms? For example: form1 submit button configuration to classA and form2 submit button configuration to classB. Is it possible?
user2444474
  • 623
  • 8
  • 21
  • 40
-1
votes
2 answers

Couldn't find action or result. No result defined for action in Struts 2

I have configured the annotation to return the values as text. But it's giving me the error: could not find action or result. Console error: org.apache.struts2.dispatcher.Dispatcher - Could not find action or result /part!finder.xhtml No result…
user2444474
  • 623
  • 8
  • 21
  • 40
1
2