This week's giveaway is in the Spring forum.
We're giving away four copies of Learn Spring Security (video course) and have Eugen Paraschiv on-line!
See this thread for details.
Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Action problem

 
Alvin chew
Ranch Hand
Posts: 834
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
an empty textfield submission calls setEmail("")

email is then set to ""

so the getEmail is returning ""

your check is for null, not "" (empty String)
 
Alvin chew
Ranch Hand
Posts: 834
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you marc !!
 
Alvin chew
Ranch Hand
Posts: 834
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 834
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
actionform



html form
 
Alvin chew
Ranch Hand
Posts: 834
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You haven't actually described what the problem is. What error are you getting?

Andy
 
Alvin chew
Ranch Hand
Posts: 834
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, andy, thank for viewing, my tomcat show me the "actionmapping or actionform collection error"
 
Alvin chew
Ranch Hand
Posts: 834
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic