【Java开源代码栏目提醒】:以下是网学会员为您推荐的Java开源代码-cart_jsp.java,希望本篇文章对您学习有所帮助。
package org.apache.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.util.*;
import ch5.Cart;
public final class cart_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent {
private static java.util.Vector _jspx_dependants;
static {
_jspx_dependants = new java.util.Vector(2);
_jspx_dependants.add("/header.jsp");
_jspx_dependants.add("/tail.jsp");
}
public java.util.List getDependants() {
return _jspx_dependants;
}
public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, ServletException {
JspFactory _jspxFactory = null;
PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
JspWriter _jspx_out = null;
PageContext _jspx_page_context = null;
try {
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html; charset=gb2312");
pageContext = _jspxFactory.getPageContext(this, request, response,
null, true, 8192, true);
_jspx_page_context = pageContext;
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
_jspx_out = out;
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("<html>\r\n");
out.write("<head>\r\n");
out.write("<title>璐墿杞?/title>\r\n");
out.write("</head>\r\n");
out.write("<body>\r\n");
out.write("\r\n");
out.write("<LINK href=\"hellking2.css\" type=text/css rel=stylesheet>\r\n");
out.write("<center>\r\n");
out.write("======================================<br>\r\n");
out.write(" 涓涓畝鍗曠殑璐墿杞︾▼搴?br>\r\n");
out.write("=======================================<br>\r\n");
out.write("娆㈣繋鎮紒\r\n");
out.write(org.apache.jasper.runtime.JspRuntimeLibrary.toString((((ch5.Cart)_jspx_page_context.findAttribute("cart")).getUserId())));
out.write("\r\n");
out.write(".褰撳墠鐨勬椂闂存槸锛?);
out.print(new java.util.Date().toLocaleString());
out.write("\r\n");
out.write("<br>\r\n");
out.write("</center>");
out.write("\r\n");
out.write("<hr>\r\n");
out.write("<font size=\"2\">\r\n");
ch5.Cart cart = null;
synchronized (session) {
cart = (ch5.Cart) _jspx_page_context.getAttribute("cart", PageContext.SESSION_SCOPE);
if (cart == null){
cart = new ch5.Cart();
_jspx_page_context.setAttribute("cart", cart, PageContext.SESSION_SCOPE);
out.write('\r');
out.write('\n');
}
}
out.write("<br>\r\n");
out.write("<p><font color=\"#804040\" face=\"妤蜂綋_GB2312\"><strong>杩欓噷鏄涓鐧捐揣鍟嗗満锛岄夋嫨鎮ㄨ璐拱鐨勫晢鍝佹坊鍔犲埌璐墿杞︼細</strong></font>\r\n");
out.write(" ");
String str=response.encodeRedirectURL("add.jsp");
out.write("\r\n");
out.write("<form action=\"");
out.print(str);
out.write("\" method=\"post\" name=\"form\">\r\n");
out.write(" <select name=\"item\" value=\"娌¢夋嫨\">\r\n");
out.write(" <option value=\"TV\">鐢佃鏈?/option>\r\n");
out.write("\t\t<option value=\"apple\">鑻规灉</option>\r\n");
out.write("\t\t<option value=\"coke\">鍙彛鍙箰</option>\r\n");
out.write("\t\t<option value=\"milk\">鐗涘ザ</option>\r\n");
out.write("\t\t<option value=\"tea\">鑼跺彾</option>\t\t\r\n");
out.write(" </select>\r\n");
out.write("<p><font face=\"妤蜂綋_GB2312\">杈撳叆璐拱鐨勬暟閲忥細</font>\r\n");
out.write("<input type=\"text\" name=\"mount\">\r\n");
out.write(" <p><font face=\"妤蜂綋_GB2312\">閫夋嫨璁¢噺鍗曚綅锛?/font> \r\n");
out.write(" <input type=\"radio\" name=\"unit\" value=\"涓猏">涓猏r\n");
out.write("<input type=\"radio\" name=\"unit\" value=\"鍏枻\">鍏枻\r\n");
out.write("<input type=\"radio\" name=\"unit\" value=\"鍙癨">鍙癨r\n");
out.write("<input type=\"radio\" name=\"unit\" value=\"鐡禱">鐡禱r\n");
out.write("<input type=\"submit\" value=\"鎻愪氦娣诲姞\">\r\n");
out.write("</form>\r\n");
out.write("<p><font face=\"妤蜂綋_GB2312\">鎮ㄧ殑璐墿杞︽湁濡備笅鍟嗗搧</font>锛?<font color=\"#FF8040\" size=\"1\"> \r\n");
out.write(" ");
Hashtable list=cart.list_h();
Enumeration enums=list.elements();
while(enums.hasMoreElements()){
String goods=(String)enums.nextElement();
byte b[]=goods.getBytes("ISO-8859-1");
goods=new String(b);
out.print("<br>"+goods);
}
out.write("\r\n");
out.write(" </font> \r\n");
out.write(" ");
String strl=response.encodeRedirectURL("selectRemoveGoods.jsp");
out.write("\r\n");
out.write("<form action=\"");
out.print(strl);
out.write("\" method=\"post\" name=\"form\">\r\n");
out.write("<input type=\"submit\" value=\"淇敼璐墿杞︿腑鐨勮揣鐗‐">\r\n");
out.write("</form>\r\n");
out.write("</font>\r\n");
out.write("\r\n");
out.write("<center>\r\n");
out.write("<hr>\r\n");
out.write(" ©JSP+TOMCAT+LINUX缃戠粶缂栫▼瀹炶返|鑱旂郴浜猴細tang \r\n");
out.write("</center>");
out.write("\r\n");
out.write("</body>\r\n");
out.write("</html>\r\n");
} catch (Throwable t) {
if (!(t instanceof SkipPageException)){
out = _jspx_out;
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
}
} finally {
if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
}
}
}
上一篇:
CarType.java
下一篇:
还记得,那年的风车吗?