<% String num = (String) session.getAttribute("number"); int i = Integer.parseInt(num); %> <% int count = 1; count = count * i; %> 应该像这样吧