I am trying to update from Struts 2.3.32 to Struts 2.5.25.
Before the update, I used to access it in camel case as shown below.
http: // localhost: 8080/xxx/hoge/userLogin
After the update, it became inaccessible and I checked it with config-browser
Action was separated by hyphens.
http: // localhost: 8080/xxx/hoge/user-login
It can be displayed by accessing it separated by hyphens, but
I don't want the URL to change, so I want to solve this.
As one of the methods, if you add the following annotation to the Action class
I found that I could still access it.
@Action (value = "userLogin")
Just without adding such annotations to all Action classes
I want to set it in a configuration file etc. (Because there are quite a lot of classes)
Could anyone please teach me how to do this?
Answer # 1
I found that the following settings can be made in xml,
Even if you can remove the hyphen delimiter or make it lowercase
I couldn't make it into a camel case.
<constant name = "struts.convention.action.name.separator" value = "" /> <constant name = "struts.convention.action.name.lowercase" value = "false" />
Because I want to avoid modifying the caller
It corresponded by annotating the Action class.
I want to know how it was achieved (TT)
- java - i started studying struts, but i can't run to action even if i follow the procedure
- java - when i redraw it in contentpane, the action doesn't work at all
- java - 404 error when updating to struts 2525
- java - strutstileslistener gets classnotfoundexception on update to struts 2525
- java - is it possible to execute an action class with windowopen?
- java - tiles are not recognized under struts 25 environment
- please tell me how to get java language action events and texts
- java - the value set in the action of thymeleaf form is not reflected as expected
- i want to implement a java button action
- python - you may need to restart the kernel to use updated packages error
- php - coincheck api authentication doesn't work
- php - i would like to introduce the coincheck api so that i can make payments with bitcoin on my ec site
- [php] i want to get account information using coincheck api
- the emulator process for avd pixel_2_api_29 was killed occurred when the android studio emulator was started, so i would like to
- i want to call a child component method from a parent in vuejs
- python 3x - typeerror: 'method' object is not subscriptable
- dart - flutter: the instance member'stars' can't be accessed in an initializer error
- xcode - pod install [!] no `podfile 'found in the project directory