struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Puneet Babbar 2 <>
Subject RE: jsp/properties file/validation interaction question
Date Wed, 07 Mar 2012 03:45:24 GMT
I had faced the same issue, now from my limited experience this problem can be tackled in the
following ways - 

1) Replicate the key/value pairs in as from what I found struts framework always
looks for the value of the key in the "" file first. Here Action is B since
B is sending the result to A.jsp after validation.
2) Refer to the link below to read about the order in which struts looks for a key's value
in its various Resource Bundles and you choose to add your key/value pairs in a different
resource bundle.



-----Original Message-----
From: John W. Himpel [] 
Sent: Wednesday, March 07, 2012 4:48 AM
Subject: jsp/properties file/validation interaction question

Good evening,

1) ActionClass A gathers some lists used in drop-down boxes and
check-boxes in A.jsp.  ActionClass A forwards to A.jsp.
2) The user makes selections and inputs additional data into A.jsp.  The
form in A.jsp forwards to ActionClass B.  A.jsp uses the property file to provide titles, button labels, etc.
3)  ActionClass B validates the inputs from A.jsp and discovers a
validation error.  It populates the same lists referenced in #1 above.
ActionClass B then forwards to "input" which is configured to A.jsp.
3a) If ActionClass B successfully validates it's input from A.jsp, it
then performs some business logic and proceeds to forward to "success"
which is configured to B.jsp.
4)  A.jsp renders.  The drop-down boxes, check-boxes and input fields
are correctly populated.  But the jsp renderer tries to obtain a value
for <s:text value="getText('title')" /> from B.jsp.  Of course this

Either I'm missing something in A.jsp or I need to re-architect my
workflow.  I read where "chain" forwarding is highly discouraged.  Any
suggestions would be greatly appreciated.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message