WEB开发网
开发学院WEB开发Xml 将 XML 数据导入 Google App Engine 阅读

将 XML 数据导入 Google App Engine

 2010-10-22 17:18:53 来源:WEB开发网   
核心提示: <%@pagelanguage="java"contentType="text/html;charset=ISO-8859-1"pageEncoding="ISO-8859-1"%><!DOCTYPEhtmlPUBLI

<%@ page language="java" contentType="text/html; charset=ISO-8859-1" 
  pageEncoding="ISO-8859-1"%> 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
  "http://www.w3.org/TR/html4/loose.dtd"> 
<html> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> 
<title>Create all employee</title> 
</head> 
<body> 
 
  <form action="/CreateEmployee" method="POST"> 
    <textarea name="employeeXML" cols="25" rows="25"> 
    </textarea> 
    <input type="submit" value="Create Employee(s)"/> 
  </form> 
</body> 
</html> 

由于表单使用 POST 方法,需要向 CreateEmployeeServlet 类添加 doPost() 函数(参见 清单 9),以便在用户单击 Create Employee(s) 按钮时调用。

清单 9. 将 doPost 方法添加到 EmployeeServlet.java

public void doPost(HttpServletRequest request, HttpServletResponse response) 
  throws IOException, ServletException { 
 
  new EmployeeHandler(request.getParameter("employeeXML"); 
  RequestDispatcher view = request. 
    getRequestDispatcher("/createEmployee.jsp"); 
  view.forward(request, response); 
 
} 

上一页  3 4 5 6 7 8 9 10  下一页

Tags:XML 数据 导入

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接