tags:

views:

57

answers:

1

In my JSP, I have the following exception while populating drop down value.

........
<option value="Mr">MR</option>
<option value="Doctor[ServletException "/web-inf/pages/account.jsp"] An exception occured while trying to convert String "EN" to type "Java.lang.long"
.......

The value that i have passed is "Doctor of Philoshopy"

Please help me to resolve this.

A: 

You are trying to make Long Object from "EN" String it is exceptional thing so it has been thrown. :)

Post code so that I can explain you more

org.life.java
I have populated some collection into Drop down. The collection only have Mr, Doctor of philoshopy, MD. The Jsp page is not loaded properly. It has problem when assigning value "Doctor of Philoshopy".
Srinivasan
you need to post code
org.life.java
Please see my code below: <select name="suffix" id="suffix"> <option value="">Please select</option> <c:foreach items="${listofSuffixes}" var="item"> <option value="<c:out value='${item.description}'/>"> <c:out value="${item.value}"/> </option> </c:foreach> </select>
Srinivasan
@Srinivasan you are casting string to long, please post class code for list of suffixes
org.life.java