action 2 « API « JSP-Servlet Q&A





1. unable to send integer value from action class to jsp    forums.oracle.com

Hi, i have scenario like , In my action class ,, DemoAction.java int samplevar = 3 ; // appending it to string since request accepts only objects. String sample = ""+samplevar request.setAttribute("sampleVar",sample ); Demo.jsp <% int demovar = Integer.parseInt(request.getAttribute("sampleVar")) ; %> But i am unable to get the value.. what might be the reason please help...