• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

int Session value problem

 
Aravind Prasad
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Ranchers,
I'm using JSP and MySQL for my project and when in my code when I try to retrieve the data in int format, I'm getting the following errors. Please help me to fix this problem

The code is given below


The error I'm getting is


The code in line : 61 is



Please help me fix this problem.

Thanks and regards

Aravind Prasad
 
Raghavan Muthu
Ranch Hand
Posts: 3381
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Aravind,
the menu1 you are getting is the Wrapper Class Integer. But the value what you are trying to compare '1' is of built in type 'int'. thats why the mismatch.
try doing with parsing the Integer as int and compare. You can use Integer.intValue() to get the int out of Integer.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic