Link to home
Start Free TrialLog in
Avatar of jaggybala1
jaggybala1

asked on

JSP forms + including other JSP Pages

Hello Experts,

How can i make a single SUBMIT query button for 4 forms. (i mean for 3 JSP Pages are included in 1 JSP Page).

Actually i created with a single FORM..but since i am having a lot of fields , i want to split the form and make a single SUBMIT.

The display PAGE mut contain all the form fields and must be able to SUBMIT the values.

If you want, i can explain more detailly.

Regards,
Sam.
Avatar of Mick Barry
Mick Barry
Flag of Australia image

>  i want to split the form and make a single SUBMIT.

why do u want to split the form?
Avatar of jaggybala1
jaggybala1

ASKER

because i have a lot of fields...i am having 2000 lines of coding for form display and form submit action(SQL query to insert/update)...

i am having problems when i try to insert more than certain number of text inputs.(the problem is that the SUBMIT button gets deactivated!!!...donno why, but it happens only if i try to insert more than certain limit of text)

also, its very difficult for me while debugging.
but if you split it into seperate forms then you won't be passing all the the inputs in the one request.
Suggestion:

Make it in 4 page. U can use next or page number. Whenever user finish one page, he can press the next page...

Whenever user press the next page, you have to send the parameters that user type together to next page. It is same with submit but u don't need to save them to database.

Finally u have to retrieve all parameters value after submit in the last page and save it to database.

Without send the parameters value to the next page, you cannot keep them until submit.

Regards
Veronika

any other help/suggestions ...!?

- Thanx.
ok...

now i have to insert  JSP page(thats has some fields) in the other page before the SUBMIT button.

if i use,

out.print("<jsp:include page=\"page2.jsp\" flush=\"true\">");

the page2 is not displaying...
 
does it mean that it is not possible to include a page in a JSP FUNCTION. or is there any other format...!?..or did i made any mistake in the format?

Pls let me know...

Thanx,
Sam.
you shouldn't be printing the include statement you should just use:

<jsp:include page=\"page2.jsp\" flush=\"true\">

Not sure how thats going to help with your problem though.
ASKER CERTIFIED SOLUTION
Avatar of copyPasteGhost
copyPasteGhost
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial

Great help Ghost!....thanx a lot...

but my submit button gets deactivted when my input fields exceeds certain number of characters!!!...I have totally 80 fields inside the form..it works fine when i give less than that certain number of characters...

can u identify what might have went wrong?
I've never heard of that happening..
but that seems like a big number of text fields..
I think you should break it down like maybe put 20 on each page...when you click sumbit you can save the 20 already entered values into a javabean.
and then continue this way until you get all your data entered..
that's what I would do..
 that would mean that your javabean would have 80 gets and 80 sets and 80 private variables... sounds like alot but you can get it done that way.

If you need anything else let me know,
Ghost
Thanx... The problem was that i have used 'GET' method instead of 'POST' method..

anyhow,...thanx for all experts suggestions which is helping me a lot..

- Sam.