This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Struts and the fly likes submit the form in JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "submit the form in JSP" Watch "submit the form in JSP" New topic

submit the form in JSP

rupin rupin

Joined: Jul 13, 2006
Posts: 1
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.
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

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

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

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

Joined: Feb 15, 2005
Posts: 4864
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.

Consultant, Sima Solutions
I agree. Here's the link:
subject: submit the form in JSP
It's not a secret anymore!