Hello Dave,
Dave Newton wrote:
> Andreas Hartmann wrote:
>> How does struts determinate the destination to go to in error situation?
>>
>
> If you're letting Struts do the validation it will return to whatever
> you have defined as the 'input' attribute in your action mapping, which
> you didn't post. If you're doing validation some other way, impossible
> to say without more info.
The path to the wrong destination is:
After getservertyp.jsp (mapping <1>) /pages/eigenschaften-long.jsp
(mapping <2>) is loaded. On this page, a click onto "change" leads to
/pages/exec.jsp (mapping <3>).
If there is a validation error in Eigenschaftenform (mapping <2>), the
page /pages/abfrage.jsp (from mapping <4>, which has never been used in
this path) is loaded - but this is wrong. It should be
/pages/eigenschaften-long.jsp (mapping <2>).
Is mapping <4> loaded, because it's the last member of the action-mapping?
Could it be, that the attribute path of each action should be unique?
A cut of struts-config. It's important to say, that there is more than one
page which uses Eigenschaftenform and Eigenschaften.
<global-forwards>
<forward name="abfrage"
path="/pages/abfrage.jsp"/>
</global-forwards>
<action-mappings>
<!-- <1> -->
<action
input="/pages/getservertyp.jsp"
name="Getservertypform"
scope="request"
path="/Show"
type="de.fiducia.Getservertyp">
<forward name="Liste" path="/pages/eigenschaften-short.jsp"/>
<forward name="Detailliste" path="/pages/eigenschaften-long.jsp"/>
<forward name="letzte Aktion" path="/pages/last-action.jsp"/>
</action>
<!-- <2> -->
<action
input="/pages/eigenschaften-long.jsp"
name="Eigenschaftenform"
scope="request"
path="/Eigenschaften"
type="de.fiducia.Eigenschaften">
<forward name="change" path="/pages/exec.jsp"/>
</action>
<!-- <3> -->
<action
input="/pages/exec.jsp"
name="Eigenschaftenform"
scope="request"
path="/Eigenschaften"
type="de.fiducia.Eigenschaften">
</action>
<!-- <4> -->
<action
input="/pages/abfrage.jsp"
name="Eigenschaftenform"
scope="request"
path="/Eigenschaften"
type="de.fiducia.Eigenschaften">
<forward name="Installation starten" path="/pages/exec.jsp"/>
<forward name="abbrechen" path="/pages/abbruch_done.jsp"/>
</action>
</action-mappings>
Kind regards,
Andreas Hartmann
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]