•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JSP section within the Web Development category of DaniWeb, a massive community of 402,665 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,260 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JSP advertiser: Lunarpages JSP Web Hosting
Views: 6771 | Replies: 6
![]() |
•
•
Join Date: Mar 2006
Posts: 20
Reputation:
Rep Power: 3
Solved Threads: 0
Hi ,
i have some elements in one form(sample.jsp).I want to insert that fields into database.But i know abt, the insertion of form values in to the database using next page(next page contains database connection) .But i don't know how do write the database connection within the same page(sample.jsp).
Anyone can you help me
Thank you
i have some elements in one form(sample.jsp).I want to insert that fields into database.But i know abt, the insertion of form values in to the database using next page(next page contains database connection) .But i don't know how do write the database connection within the same page(sample.jsp).
Anyone can you help me
Thank you
•
•
Join Date: Apr 2006
Posts: 5
Reputation:
Rep Power: 0
Solved Threads: 0
•
•
•
•
Originally Posted by muthumari
Hi ,
i have some elements in one form(sample.jsp).I want to insert that fields into database.But i know abt, the insertion of form values in to the database using next page(next page contains database connection) .But i don't know how do write the database connection within the same page(sample.jsp).
Anyone can you help me
Thank you
You could use Javascript to get a connection to the database. Wil that work for you?
•
•
Join Date: Apr 2006
Posts: 3
Reputation:
Rep Power: 0
Solved Threads: 0
you could also break the page into two pages.Basically, you could have the page call itself. Like if you wanted to insert username and password into your database, you could do this (this is just sample code)if (theQueryNotComplete){ Do the code for the 1st logical page. With the two elements on them.}else{ And have the info past to the database. now process info and place output.}Now in the if part, place a form/anchor that will point to the same page, this way the info is past to the current page, and it seems as if the page has gone to another, however it really stays on the same page.Even with this it may not seem as practical as above because it will still load, the other alternative is learning AJAX.
•
•
Join Date: May 2007
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
•
•
•
•
Hi ,
i have some elements in one form(sample.jsp).I want to insert that fields into database.But i know abt, the insertion of form values in to the database using next page(next page contains database connection) .But i don't know how do write the database connection within the same page(sample.jsp).
Anyone can you help me
Thank you
Please tell me how to do it in two pages.
I use JSP,PHP and mysql.
Thanks, Looking forward to your reply.'
•
•
Join Date: Dec 2004
Location: London or Slovakia
Posts: 2,230
Reputation:
Rep Power: 10
Solved Threads: 270
•
•
•
•
Please tell me how to do it in two pages.
I use JSP,PHP and mysql.
Thanks, Looking forward to your reply.'
If you know JSP as you claim to know, then you would know there are servlets that are design to set connection with database and they are also able to store data in sessions. These data can be then easly retrived in JSP from session.
PS: Solution to original post is useless...
Last edited by peter_budo : May 28th, 2007 at 5:48 am.
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)
If we helped you to solve your problem, answered your question please mark your post as SOLVED.
Publilius Syrus
(~100 BC)
If we helped you to solve your problem, answered your question please mark your post as SOLVED.
•
•
Join Date: Dec 2004
Location: London or Slovakia
Posts: 2,230
Reputation:
Rep Power: 10
Solved Threads: 270
please find a book to learn that or can start reading following topics
http://java.sun.com/docs/books/tutor...iew/index.html
http://javaboutique.internet.com/tutorials/JSP/
and you can search on google for more
Do not expect that somebody will give you code without any input from you...
http://java.sun.com/docs/books/tutor...iew/index.html
http://javaboutique.internet.com/tutorials/JSP/
and you can search on google for more
Do not expect that somebody will give you code without any input from you...
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)
If we helped you to solve your problem, answered your question please mark your post as SOLVED.
Publilius Syrus
(~100 BC)
If we helped you to solve your problem, answered your question please mark your post as SOLVED.
![]() |
•
•
•
•
•
•
•
•
DaniWeb JSP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- How to Connect MySQL from JSP Page (JSP)
- How to connect Oracle database from JSP page (Java)
- Very Very Urgent...Need Code for Calculating Execution Time For Jsp Page (JSP)
- How to run iReport jrxml from a jsp page (JSP)
- Inserting uft8 strings into MySQL from jsp page (JSP)
- how to connect oracle 8i database with jsp page (JSP)
- I think I'm going to cry... (JSP)
- WML and connection to Acess and JSP/tomcat (Computer Science and Software Design)
Other Threads in the JSP Forum
- Previous Thread: How to install JDBC Driver for MSSQL ?
- Next Thread: how to send email using jsp



Linear Mode