• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Adding int value in to a session

 
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,
In my project here i'm using int values like 0 and 1 to make the account active or inactive. It is working perfectly in my local machine and when i uploaded the war file to the remote server, it is showing error

my code is here


It is running perfectly in my local machine which is not showing the error. When i uploaded it in the remote machine i'm getting the following error




Please help me ranchers..
I want to remove this error. from the remote server..
Today evening i want to show the uploaded file running..fine..

Please help me as soon as possible..
Thanks in advance

regards

Aravind Prasad
 
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Aravind,
What is the JVM that you are using in your local machine ..?
I think it will be JDK 1.5 or later.. and your remote server is running in 1.4 ..I JDK 1.5 primitive values are automatically boxed into its corresponding wrapper object. So its running fine in your machine.

But this auto boxing wont happen in JDK 1.4.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To add to Balasubramani's answer.
The simplest fix is to box your primitives yourself.

 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also,
The putValue method has been deprecated for a long time.
http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpSession.html

I would advise not using deprecated methods in your project.
 
Aravind Prasad
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thankyou very much Balasubramani and Ben..
My Program worked perfectly..

I thought the problem was
I was using Windows machine for local test and the remote system was Linux..I thought the problem was that.

Now i'm really happy.. I showed my demo.. and my boss appreciated me!!

Itz all because of you and Java Ranche

regards

Aravind Prasad
 
Aravind Prasad
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,
When i put for the session.getValue("status") also it is giving the error

the code is here



The error i'm getting is here



Please Help me ranchers..

Thanks in advance

regards

Aravind Prasad
 
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Aside from the error, why are you using deprecated methods?

What's on line 2 of your JSP?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic