I have a variable of type float.can anyone tell me how to put this in session as an attribute so that i can use it in other pages.plz reply

Recommended Answers

All 4 Replies

new Float(float);

hi then how to retrieve it
ie,, i set a session as session.setAttribute("name",new Float(floatvalue))
then how to get it.

Use getAttribute, you can pass float as a string as well.

No reason to pass it as a String.

float value = ((Float) session.getAttribute("name")).floatValue();
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.