How to convert Integer value to String Value in JSP?
Posted on 2001-08-26
Hi, i'm new with JavaServer Page(JSP), and i want to do some increasing number as the ID number for employee records. below is the case and problems found:
1.in the Page1.jsp
select * from employee order by(ID) desc
int id2=id+1 //to increase a number for a new employee
2. in the Page2.jsp
"insert into employee(id, name)values(id2,'"+name"'")");
Error Message: Can't convert Integer to String
So, can you show me how to solve this problem?