Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Struts error message display

 
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's the thing. I have a input.jsp which just has a text field. I have written the form file for this with the usual getters and setters. The problem I am having is that the error message ( that the id is missing )appears when I load the page itself. I am not able to make it appear once the submit button is clicked. I am not sure what I am doing wrong. Any help would be appreciated. Thanks.
 
Ranch Hand
Posts: 415
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ritu

One thing how are u loading that page ?? is it thorugh some action class .if so make sure that that action should not have any form bean associated with it and even if it has u should bypass the validations .........that might be one reason why it might be happening

if its directly loading a jsp i dont think so it will happen
 
Ritu varada
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are right, Sreenath. The jsp does point to a action class which is associated with a form bean and hence the validation shows up. I want the jsp to be associated with the form bean. Then, how do I make the validation come up only when the submit is clicked ? How do I bypass the validation when the page is initially loaded ? Thanks for your help.
 
sreenath reddy
Ranch Hand
Posts: 415
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ritu

Its just simple ,defaultly validate will be true so just set the validate="false" while loading that page and ofcourse on clicking submit that action should have validate="true" which will validate only on submit if u still have any issue u can mail me at sreenathn@huawei.com
 
You ridiculous clown, did you think you could get away with it? This is my favorite tiny ad!
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
    Bookmark Topic Watch Topic
  • New Topic