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

submit the form in JSP

 
rupin rupin
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am having a problem in summittin the form from JSP. Can Any one help me please.
I am having a Form Bean person as

public String lastName ;
public String firsdName ;
Address address;

where as address Bean from as

public String streetName;
public String suburb;
public String postcode;


in JSP
i am displaying the address and first name and suburb and poscode etc. Display no problem. The suburb is in the drop list using <html:select tag.
When I change the suburb and submit it is giving error message saying that no bean form defined.
I used as property as "address.suburb"
Thank in Advance.
Rupin
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
rupin rupin,
Welcome to JavaRanch!

We're pleased to have you here with us in the JSP forum, but there are a few rules that need to be followed, and one is that proper names are required. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

You can change it here
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, this:
The suburb is in the drop list using <html:select tag.

indicates that you are developing this with Struts.

I'm going to move this to our Struts forum where the Struts gurus hang out.
[ July 13, 2006: Message edited by: Ben Souther ]
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If your ActionForm is in request scope, you need to make sure that the address object gets instantiated either in the form bean's reset() method or in the no-args constructor. Remember, request scope only lasts for one request, so when the form is submitted, Struts has to create a new instance of the form bean.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic