1

What does this following code do?

mapping.getInputForward()

  1. Does is sends the control back to the struts-config file?
  2. Does it send the control to the action form?

Thanks.

Punjan Sudhar
  • 221
  • 1
  • 2
  • 8
  • 1
    It does what the javadoc says it does: http://struts.apache.org/release/1.2.x/api/org/apache/struts/action/ActionMapping.html#getInputForward%28%29. In particular, it doesn't send the control to anything. It simply gets an ActionForward defined in the config file. And your question makes no sense, because neither the action form nor the config file can have the control. – JB Nizet Nov 13 '13 at 12:24

1 Answers1

1

It returns the forward names as the "input" property of the action in question.

It can be used to return to a form page on validation failure, for example.

Dave Newton
  • 158,873
  • 26
  • 254
  • 302