aspose file tools*
The moose likes Struts and the fly likes Very New to Struts w/ 3 Questions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Very New to Struts w/ 3 Questions" Watch "Very New to Struts w/ 3 Questions" New topic
Author

Very New to Struts w/ 3 Questions

Elle Atechsy
Ranch Hand

Joined: Jan 23, 2004
Posts: 96
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

Joined: Feb 05, 2003
Posts: 4727

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 ]

A good workman is known by his tools.
alan do
Ranch Hand

Joined: Apr 14, 2005
Posts: 354
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...


-/a<br />certified slacker...yes, my last name is 'do' - <a href="http://www.luckycouple.com" target="_blank" rel="nofollow">luckycouple.com</a>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Very New to Struts w/ 3 Questions
 
Similar Threads
Struts 1.x, 2, jstl questions
are there any known bugs with struts html:hidden tag?
jsp vs servlet, stardard tag vs javabean
how to display the preselected item in the html dropdown as unselected.
construct struts tags dynamically