| Author |
Compare textbox data with sql table data
|
Rakesh Keerthi
Ranch Hand
Joined: Jul 16, 2012
Posts: 103
|
|
I'm creating an app, that displayes a String from a database. This String is then displayed in a textbox that cannot be edited.
I now require that varible (String passed) in the text box to be compared with a column in a SQL database table which is an identical String. Once the matching String is found I need to update other columns based on the queries.
when i use request.getParameters() method it is giving output as null.
i need it to be done purely in jsp. please help.
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56554
|
|
Rakesh Keerthi wrote:I'm creating an app, that displayes a String from a database. This String is then displayed in a textbox that cannot be edited.
Please be precise when posting. Does this mean that you made the control disabled or readonly? They are not the same and which you used may be the answer to your question. Just saying "cannot be edited" doesn't give us the information we need to answer your question.
But I'm guessing that you used disabled, which means that the value will not be submitted.
i need it to be done purely in jsp
I sincerely hope that this does not mean that you are putting Java code in your JSPs!
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Rakesh Keerthi
Ranch Hand
Joined: Jul 16, 2012
Posts: 103
|
|
Hi,
i made it read only.
here the data is getting retrieved from a sql query and below is the code that i used to do so.
and the jsp used to compare the data is as below
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56554
|
|
|
Please read this JspFaq entry.
|
 |
Rakesh Keerthi
Ranch Hand
Joined: Jul 16, 2012
Posts: 103
|
|
Thank you very much for the suggestion but i'm new to JSP technology and i'm not aware of this subject. please help me with the JSP code
|
 |
Rakesh Keerthi
Ranch Hand
Joined: Jul 16, 2012
Posts: 103
|
|
Hi Bear,
could you please help me in solving this using JSP instead of going with JSTL as it is entirely a new concept for me.
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56554
|
|
The first sep is to move the Java code out of the JSP and into a servlet controller. Please read this article for information on proper web app structure.
If you are a novice to JSP you should be learning to do things the right way rather than wasting time establishing bad habits that you'll just need to unlearn later.
|
 |
 |
|
|
subject: Compare textbox data with sql table data
|
|
|