I have searched and searched and this is destroying me. I have this:
<s:form method="post" action="%{methodOne}" cssClass="buttons">
The emailFormUrl returns the URL correctly but the parameters have been stripped.
public String methodOne() {
return anotherClass.methodTwo(id);
}
Which speaks of:
public static String methodTwo(
String id) {
return fastEncode("", "longurl/view.jsp",
new ParameterPairing("id", id));
}
For some reason, the id is being stripped, this leaves me with a validation error and doesn't complete the action that I require. As I am aware we did not have a problem with it before the July urgent security update but it is small functionality that is rarely used (an argument for its removal I guess).
I don't want to add a hidden parameter as I want to understand the reason that this is not working, not a workaround (I am still in the heavy learning part of my career).
In servlet environment the <s:form>
tag uses ServletUrlRenderer
class to render form url.
If configuration for the action specified in action
attribute cannot be found then literal value (w/o parameters) of an action
attribute will be used.
Note: you need to use action name w/o extension in order that it can be found in configuration. So some_action?foo=bar
will be set with parameters in form if you have some_action
in configuration, but some_action.action?foo=bar
won't be found because of .action
extension and parameters will be stripped.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With