It's not a secret anymore!*
The moose likes Struts and the fly likes Action problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Action problem " Watch "Action problem " New topic
Author

Action problem

Alvin chew
Ranch Hand

Joined: Jan 08, 2004
Posts: 834
Type : ActionForm
Name : TestForm




Type : Action
Name : Testing





hi, good day, i having a problem in action, which as shown on top source code, my problem is if i do not type any character in email textfield, it still calling the "success", can any GURU here please point out my mistake ? thank you very much !!
[ August 23, 2004: Message edited by: Alvin chew ]
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

an empty textfield submission calls setEmail("")

email is then set to ""

so the getEmail is returning ""

your check is for null, not "" (empty String)


A good workman is known by his tools.
Alvin chew
Ranch Hand

Joined: Jan 08, 2004
Posts: 834
thank you marc !!
Alvin chew
Ranch Hand

Joined: Jan 08, 2004
Posts: 834
another problem which now cause actionmapping or actionform collection problem ..

struts-config.xml - formbean part


struts-config.xml - actionmapping part


action class
Alvin chew
Ranch Hand

Joined: Jan 08, 2004
Posts: 834
actionform



html form
Alvin chew
Ranch Hand

Joined: Jan 08, 2004
Posts: 834
as mentioned, i found the actionmapping or actionform collection error, i check the error for many times, still can't figure out what problem is it ...as a newbie in struts, i would like to say thank you again for your time and your advice !!
Andy Deighton
Ranch Hand

Joined: Apr 01, 2003
Posts: 39
You haven't actually described what the problem is. What error are you getting?

Andy
Alvin chew
Ranch Hand

Joined: Jan 08, 2004
Posts: 834
hi, andy, thank for viewing, my tomcat show me the "actionmapping or actionform collection error"
Alvin chew
Ranch Hand

Joined: Jan 08, 2004
Posts: 834
to further describe, my problem is actually , the jsp page that suppose to display form but some how it couldn't display out but generate the error
 
Consider Paul's rocket mass heater.
 
subject: Action problem