struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Li Ying <liying.cn.2...@gmail.com>
Subject Re: Another stupid question re: Interceptors
Date Wed, 17 Nov 2010 13:14:55 GMT
I suggest you to do these things in the following way:

(1)put 2 method in IdentifyAction.
The first [execute] method returns [input],
show the input page to user.

(2)In the  Identify-input.jsp,
submit fields to [IdentifyAction] itself, but another method: [verify]

(3)when validation fails, the result will be [input] automatically,
which means, the input page will be shown again.

(4)when validation validation passes, your method [verify] will be
executed. You can implement your business logic in it. If the
verification fails, you can return a result [input], and back to the
input page again. If the verification pass, you can return another
result, and forward(or redirect) to the next action; or you can return
a result [success], show the Identify-success.jsp page.

(5)another thing need to notice is, method [execute] should be marked
by [skipvalidation] annotation

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message