encodingfilter.java
来自「《J2EE企业级应用开发》一书的配套源代码」· Java 代码 · 共 47 行
JAVA
47 行
package com.j2eeapp.cdstore.servlet;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class EncodingFilter extends HttpServlet
{
/**
* @J2EE_METHOD -- doGet
* Called by the server (via the service method) to allow a servlet to handle a GET request.
* The servlet container must write the headers before committing the response, because
* in HTTP the headers must be sent before the response body. The GET method should
* be safe and idempotent. If the request is incorrectly formatted, doGet returns an
* HTTP 'Bad Request' message.
* @throws javax.servlet.ServletException
* @throws java.io.IOException
*/
public void doGet (HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
{
}
/**
* @J2EE_METHOD -- doPost
* Called by the server (via the service method) to allow a servlet to handle a POST
* request. The HTTP POST method allows the client to send data of unlimited length
* to the Web server a single time and is useful when posting information such as credit
* card numbers. If the HTTP POST request is incorrectly formatted, doPost returns
* an HTTP 'Bad Request' message.
* @throws javax.servlet.ServletException
* @throws java.io.IOException
*/
public void doPost (HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
{
}
/**
* @J2EE_METHOD -- EncodingFilter
*/
public EncodingFilter ()
{
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?