Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts1.2_ Exception

 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

i deploy the application but when i run my jsp file ,i got below exception



please help me out
 
Mourouganandame Arunachalam
Ranch Hand
Posts: 396
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This exception typically occurs because Struts cannot find the form bean it expects for a specific action according to the mapping in the struts-config.xml file. Most often, this is probably because the name given to the form in the name attribute of the form-bean element does not match the name attribute of the associated action's action element. In other words, the action and form should each have a name attribute that matches exactly, including case. It has been reported that this error has been seen when no name attribute is associated with the action. If there is no name attribute in an action element, no form is associated with the action.

Mourougan
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,


in stuts1.2 , if you specify <html:form> element then, you should use ActionForm?...but here i do not want to use ActionForm

Action in struts-config



my jsp page:




if i use ordinary form it is ok but if i use stuts form then i am not getting the above exception(i mention in my first post)


please anybody explain me
[ November 14, 2008: Message edited by: seetharaman venkatasamy ]
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by seetharaman venkatasamy:
but if i use stuts form then i am not getting the above exception(i mention in my first post)


please anybody explain me



Its right , when you used <html:form (a struts tag) it looks for the mapping of ActionForm (bean) in <action >tag in struts-config.xml, for collecting the user input into a bean..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic