Win a copy of Rust Web Development this week in the Other Languages forum!

Sam Raoh

Greenhorn
+ Follow
since Dec 21, 2009
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 Sam Raoh

I got it working folks!
Thank you Vikas
Thanks, but No Thanks, but Thanks very much... Bear
12 years ago
JSP
thanks...yeah I know that we have to use <option value="xyz" selected>...but I was wondering how we go about doing the same in that code?

I do have my program working when I use a String to display options, but I'd like to know if there is anyway we can do the same, using EL, when and arraylist of Hashmaps is used, as in the code displayed above?

Thank you
12 years ago
JSP
Hi all,

I have the following code


used for drop down list in my jsp, where utList is an Arraylist of Hashmaps from the backend database table. I am able to display the dropdown box but on submit I am not able to retain the selected value.

I do have a session.getAttribute set for the selected value in my servlet.

Thanks.
12 years ago
JSP
Thanks Dav. I got it working..

Since you asked. It was in the JSP page.

The solution was to use:

<option value = <%= type %>>< %= strName1 %></option>



12 years ago
JSP
Hi all,

I am trying to insert data from a jsp form into a table when the user clicks the submit button. I am encountering this exception.

java.lang.NumberFormatException: For input string: "type"

Here is my code:

This is the code in the form jsp:


this is my code in the sign - up bean:



and this is my dbBean's insert method:




thank you very much. any help is greatly appreciated
12 years ago
JSP