• 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

Struts Validation Problem

 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello All,

I am having a bit of a problem setting up the built in validation mechinism in Struts.

I have created an Action Form and a validate method. When I generate an error it should forward the request to the resource defined with the 'input' parameter for the action defined in the struts config file. Instead, upon generating an error it forwards to a blank page, no output what-so-ever.

This is what my action definition looks like.


This is what my validation method looks like:

As you can see it is just hard coded to throw an error no matter what...

According to the documentation it should forward the request to /jsp/register.jsp upon error. Instead I just get a blank page. What am I missing here?

Thanks for the help,
Jamin
 
Jamin Williams
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Any help out there? Did I forget to include the secret emoticon?

Jamin
 
Jamin Williams
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I found the problem.

Tomcats default setting in the config file is such that the input attribute for an action is treated as a global or local forward rather then a module realative path.



The struts documentation says nothing about this setting in the auto form validation section and I just sort of stumbled upon it while looking at the config file for the 100th time.

Thanks for the help anyway...
[ January 02, 2005: Message edited by: Jamin Williams ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic