Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Very New to Struts w/ 3 Questions

 
Elle Atechsy
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm trying to convert a non-struts Java application into struts, and need to cut some corners due to tight deadlines.

#1: Can I still use my regular html form tags, or do I have to change all or some of them to struts html tags?

#2: Can someone point me to a thorough & working Validator Framework w/ struts sample?

#3: Would anyone happen to know why my password form element loses it's value before it gets to the form bean? The login name gets there, but the password doesn't.


Thanks in Advance for any assistance.

Lulu
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Lulu Carr:
Hi,

#1: Can I still use my regular html form tags, or do I have to change all or some of them to struts html tags?

You can still use regular html form tags, but you'll find the prepopulation features of Struts tags very beneficial.

#2: Can someone point me to a thorough & working Validator Framework w/ struts sample?

Can't think of one. If I were cutting corners because of time constraints, the validator framework would be one my first cut. I assume you've only a couple days to finish this.

#3: Would anyone happen to know why my password form element loses it's value before it gets to the form bean? The login name gets there, but the password doesn't.

The element isn't losing its value. There is probably a typo between the field's name and the setter method in the ActionForm, causing the ActionForm to not get the value.
[ April 21, 2005: Message edited by: Marc Peabody ]
 
alan do
Ranch Hand
Posts: 354
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. pre-populate and re-populate upon failed validation
2. http://struts.apache.org/userGuide/dev_validator.html
3. remove your onsubmit="clearPassword();" from your submit button...uh...just kidding...what marc said.

if you cut the validation framework, there isn't are really strong need to use struts-html. so 2 birds, 1 stoner...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic