java - Display validation messages in struts 2 -


i have form in application in want validate user inputs. has combo box populated db table. have go action class first populate it(for eg: populateformaction). go form.jsp page.

but problem @ time of validation. have set populateformaction input result follows

<result name="input" type="redirect">/populateformaction</result> 

but when returned form.jsp, doesn't show validation errors. think because of use of populateformaction in between action handler , form.jsp.

there 2 solutions problem

  1. call method populating combo, efore returning input (if there validation error). , dont use type redirect, instead directly move form.jsp. of course, possible if have populate combo , validate methods in same action class.

  2. pass action errors parameters populateformaction follows.take here

i m not sure whether there 's' after actionerror or not, try both


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -