?? boy.java
字號:
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class Boy extends HttpServlet
{
public void init(ServletConfig config) throws ServletException
{
super.init(config);
}
public void doPost(HttpServletRequest request,HttpServletResponse response) throws IOException,ServletException
{
PrintWriter out=response.getWriter();
response.setContentType("text/html;charset=GB2312");
out.println("<HTML><BODY>");
HttpSession session=request.getSession(true);
session.setAttribute("name","Zhoumin");
out.println(session.getId());
out.println("</BODY></HTML>");
}
public void doGet(HttpServletRequest request,HttpServletResponse response) throws IOException,ServletException
{
doPost(request,response);
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -