Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!

Donna Bachner

Ranch Hand
+ Follow
since Oct 08, 2004
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Donna Bachner

Still can't find problem. is this correct to get the value of the textbox?
13 years ago
I am getting the proper redirect just not the right value. haven't done an alert yet will see.
13 years ago
I tried that here is the code I have now. this is the jsp. I tried all request and session code listed below:


this is the servlet:

The bean has not changed.
13 years ago
Bear,
That is the code I have.

is what I just tried. The rest of the code (which I listed)I did not change. I know the bean part works. I tested it by putting values for the variables.
13 years ago
Tried that it did not work either:
13 years ago
I'm Stuck I thought I had it. I get no error messages It just does not print the right answer. I am going fron a textbox on a jsp to the servlet. here is the code I have for the jsp.

Here is what I have for the servlet:



I am using this from my bean:


The code from the bean works. I just can't get the value from the textbox to the servlet. Is there a syntax problem. This is the code as written.
13 years ago
I got it to work I had missed an assignment statement. I think i'll get done with this thing by the deadline tomorrow night.
13 years ago
I still get a null pointer exception. one question does the code look right. Am i on the right track.
13 years ago
I got that far. I decided to try moving one varible from a textbox first: here is the code I have on the jsp:

When I use this code on the jsp I get no errors.
When I go to the servlet I put the following code.

I get a null pointer exception
Ps I know your not suppose to put scriplets in your jsp. but that was the only way I could think of to get the textbox value. I'll keep working on it.
13 years ago
Chris,
That worked I now have put values in my DB. Now how do you put the variable from a text box into the DB? The textboxes are labeled:isbn, title, author, subject, condition and price. ;)
13 years ago
here is my code that does not give me compiler errors but does not work either. This is the exact wording I copied and pasted it:



I'm trying to get variables where the String are. I also changes the table to be all strings.
13 years ago
I have the single quotes around app and books because that is the way you would write the name of the DB using sql. I took out the <>'s and I quit getting the errors. I tried to put information into the DB but it does not seem to work. Will forward code when I change computers.
13 years ago
I am trying to put info into jdbc and got the folloing code from here and the sun site. I am getting the following error: expecting a ")"for each line of code. I don't see where a parenteses is needed.

Statement statement;
ResultSet book;



try{

statement = con.createStatement();

statement.execute("INSERT into 'APP'.'BOOKS' Values (?,?,?)");
statement.setInt(1, <isbn >);
statement.setString(2, <title value>);
statement.setString(3, <author value>);
13 years ago
thanks,
That tutorial and your suggestion was just what I needed. I find alsot of Suns tutorials hard to understand but this one was easy. I think I can now finish my assignment.
I found the answer to my question about how to pass a value from the jsp to the servlet. The only question I have now is how to put the variable value into the SQL is there special syntax. ;)