当前位置:编程学习 > JSP >>

一个applet---servlet通讯的例子---servlet文件

import java.io.*;
import java.util.Date;
import javax.servlet.*;
import javax.servlet.http.*;
public void Riceive extends HttpServlet
{
    public void service(HttpServletRequest req,HttpServletResponse res) throws ServletException,IOException
    {
         res.setContenType("text/plain");
         ServletOutputStream out=res.getOutputStream();
         out.print("recive user message:");
         out.print(req.getParameter("message"));
    }//end service
}//end receive

补充:Jsp教程,Application与Applet
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,