aspose file tools*
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
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
Author

have problem with multiple forms on a jsp

harsha galla
Greenhorn

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
Bartender

Joined: Jan 28, 2003
Posts: 4181
    
  21

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.


Steve
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: have problem with multiple forms on a jsp