Hi,
What is see in your jsp is the following :
String dist=(String)sess.getAttribute("distance");
String transport=(String)sess.getAttribute("service");
String amt=(String)sess.getAttribute("estimateamt");
First of all, your primitives "long" are put into session, trough autoboxing.
Further, you want to get them out. (code above)
You need to cast them back to long.
You cannot cast a primitive long to String
use String.valueOf(value) instead to get your string.