• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

int Session value problem

 
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 3389
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic