📄 xmlhttpservice.jsp
字号:
<%@page import="quickstart.ShippingCalculator,
quickstart.ShippingOption,
java.util.List" %>
<!--
////////////////////////////////////////////////////////////////////////////////
// ADOBE SYSTEMS INCORPORATED
// Copyright 2007 Adobe Systems Incorporated
// All Rights Reserved.
//
// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the
// terms of the Adobe license agreement accompanying it. If you have received this file from a
// source other than Adobe, then your use, modification, or distribution of it requires the prior
// written permission of Adobe.
////////////////////////////////////////////////////////////////////////////////
-->
<?xml version="1.0" encoding="utf-8"?>
<options>
<%
ShippingCalculator calc = new ShippingCalculator();
List options;
int zipcode;
double pounds;
zipcode = Integer.parseInt(request.getParameter("zipcode"));
pounds = Double.parseDouble(request.getParameter("pounds"));
options = calc.getShippingOptions(zipcode, pounds);
for (int i = 0; i < options.size(); i++) {
ShippingOption option = (ShippingOption) options.get(i);
%>
<option>
<service><%= option.getService() %></service>
<price><%= option.getPrice() %></price>
</option>
<%
}
%>
</options>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -