Win a copy of Machine Learning with R: Expert techniques for predictive modeling this week in the Artificial Intelligence and Machine Learning 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
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

struts 2 validation and prevent double submit

 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi. I have the following code which allows a user to register. However the validation of the form fields do not work when the interceptors are present???

RegisterAgency.jsp



struts.xml


RegisterAgencyAction-validation.xml

 
Sheriff
Posts: 9643
42
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you see here, then the basicStack doesn't have the validation interceptor. Try using the defaultStack instead in your action...
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Both the "validation" and "workflow" interceptors (or their equivalent) are required for the complete validation process--"validation" just calls validation, "workflow" redirects based on the presence (or lack thereof) of any errors.
 
vik ar
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks
 
vik ar
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
guys I have another issue. My package extends tiles-default as follows:

struts.xml


tiles.xml



RegisterAgency.jsp is as before

When the RegisterAgencyTile action is executed I get the following error:

 
vik ar
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Has anyone got an idea what the problem is here?
 
vik ar
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I remove



from my web.xml the RegisterAgency.jsp page is displayed correctly. But then I have the same problem as specified here https://coderanch.com/t/459786/Struts/container-managed-security-tiles. Any ideas?
 
vik ar
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have reworked my web.xml as follows and everything appears to be working now.



its one hell of a fudge and I'm still not sure why this issue was happening
 
pie. tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!