• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Using validate with different input jsps

 
Ranch Hand
Posts: 228
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi i have an action mapping called '/register' and 3 of my jsps use that action mapping. Now in case there is an error on the validate of the form bean ( 1 action means 1 form bean ), i need to set the input to the page that sent the request originally so i cannot have a input = ??
hard coded in the action mapping. If i try to set the input parameter of the mapping on the fly, i get an IllegalStateException as the action config is frozen.
Does anyone know how to achieve this.
TIA
S
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I had the same situation. What I did was just writing 3 action mappings having almost the same thing inside except that the "path" and the "input" attrbutes were different. the page mentioned in the input attribute is the place where you mention the page to be shown in case of validation error. though the path attribute is different but the type attribute will be the same for all the three action mappings. so the same action class will handle the action.
 
No matter. Try again. Fail again. Fail better. This time, do it with this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic