????1?????????????eclipse???????web??????????lctest??????????????tomcat???????????Ь?????????????
????2?????????????????????
??????????????κ??????
?????????????"??????"+method+"??????");"???????param???"+param);
????3??????????????д?????
????1?????????Servlet?????testServlet
????2) ??testServlet?????excute??????????????
????public void excute(HttpServletRequest request??HttpServletResponse response) throws Exception{
????request.setCharacterEncoding("utf-8");
????response.setCharacterEncoding("UTF-8");
????response.setContentType("text/xml");
????String method=request.getMethod();
????String url=request.getRequestURI();
????String param;
????if(request.getParameter("param")==null){
????param="??????????";
????}else if(method=="GET"){
????param=new String((request.getParameter("param")).getBytes("ISO8859-1")??"UTF-8");
????}else{
????param=request.getParameter("param");
????}
????StringBuffer resultBuffer=new StringBuffer();
????resultBuffer.append("??????"+method+"??????");
????resultBuffer.append("???????param???"+param);
????PrintWriter out =response.getWriter();
????out.println(resultBuffer.toString());
????out.flush();
????out.close();
????}
????3??testServlet?е?doGe()??doPost()???????з?????excute??????д???磺this.excute(request?? response);
????4???????????Servlet??д?????????????????web.xml????????????????£?
????<servlet>
????<servlet-name>testServlet</servlet-name>
????<servlet-class>com.servlet.testServlet</servlet-class>
????</servlet>
????<servlet-mapping>
????<servlet-name>testServlet</servlet-name>
????<url-pattern>/lctest/testServlet</url-pattern>
????</servlet-mapping>
????5??????Tomcat????????


????6?????tomcat?????????????????????http://localhost:8090/lctest/testServlet?????????棬??????д?????