The moose likes JSP and the fly likes have problem with multiple forms on a jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "have problem with multiple forms on a jsp" Watch "have problem with multiple forms on a jsp" New topic

have problem with multiple forms on a jsp

harsha galla

Joined: Sep 24, 2008
Posts: 18
i have different forms on a single jsp and the code goes like this:

i have jquerey for accordion and tabs..each accordion opens to give a form which refers a servlet at backend..

i get the following error when i try filling a form and submit it:

java.lang.NumberFormatException: For input string: ""
Steve Luke

Joined: Jan 28, 2003
Posts: 4167

I actually see only one form on there - as delineated by <form> </form> tags. So you don't have multiple forms. If you want multiple forms, you will need to put each one in their own set of form tags and give each one their own submit button.

The error tells you that you are trying to pull out a value for a field and turn it into a number, but the field was not entered by the user. So you have to validate the form (at least check that all required fields were entered) and respond to the client that there are missing values if they haven't filled the form out completely.

I agree. Here's the link: http://aspose.com/file-tools
subject: have problem with multiple forms on a jsp
Similar Threads
pass a variable in the URl
Fieldset is not working
wrong jar reference
Fieldset is not working
set values in a table from other