| Author |
getting textbox value for resultset
|
santosh garg
Greenhorn
Joined: Feb 02, 2009
Posts: 10
|
|
Hi am new to jsp I want to get textbox value into resultset where condition. I am sorry if I am asking a very simple quest.
thanks
|
 |
Seetharaman Venkatasamy
Ranch Hand
Joined: Jan 28, 2008
Posts: 5575
|
|
Welcome to javaranch.We are Happy to have you here
|
 |
Seetharaman Venkatasamy
Ranch Hand
Joined: Jan 28, 2008
Posts: 5575
|
|
There is no too simple question .Coming to your question ,
get the text field value of jsp in servlet using request.getParameter("text_field_name") returns String .Pass this into your DAO (in which java class you put the DB related stuff)class's method and Use this String Object in your where condition of your db query
Hope this helps
|
 |
santosh garg
Greenhorn
Joined: Feb 02, 2009
Posts: 10
|
|
thanks for your answer, it really worked for me. Now I have another problem I want to update database when pressing update button. I am having following code with button.
<input type=button name="update"
value="Update" immediate="true" action="return update();">
but I don't know where to write my update function if I write it into <script language= javascript -- I can't get the resultset or should I declare my function into ><% function %>
I am using servlet DBConnection for database connection and update purpose and accessing with
<jsp:useBean id="ob" class="connect.DBConnection"
scope="page" />
I hope you can understand my problem.
thanks in advance
Thank you
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56179
|
|
|
"santosh kumar access", please check your private messages for an important administrative matter.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56179
|
|
|
You need to learn how to properly structure web applications. Perhaps this article will help get you started.
|
 |
santosh garg
Greenhorn
Joined: Feb 02, 2009
Posts: 10
|
|
Bear Bibeault wrote:You need to learn how to properly structure web applications. Perhaps this article will help get you started.
Dear Sir,
I read the prescribed article, it really helped me to understand the structure of web-application.
|
 |
 |
|
|
subject: getting textbox value for resultset
|
|
|