📄 test44.java~
字号:
/**** Test44 servlet***** Author : Ramesh.Mandava*****/package servlets.stdPos;import javax.servlet.*;import javax.servlet.http.*;import java.io.*;import java.util.*;public class Test44 extends HttpServlet { String initParam1, initParam2; public void init ( ServletConfig config ) throws ServletException { super.init(config); System.out.println(" I am init of Test44 "); } public void service ( HttpServletRequest req, HttpServletResponse resp ) throws ServletException,IOException { PrintWriter out = resp.getWriter(); resp.setContentType("text/html"); out.println(" <HTML> "); out.println(" <HEAD>"); out.println(" <TITLE>Test44 servlet : Checking Request.setAttribute, Request.getAttribute </TITLE> "); out.println(" </HEAD> "); out.println(" <BODY BGCOLOR=white> "); out.println(" <CENTER> "); out.println(" <FONT COLOR=BLUE> "); out.println(" <STRONG>Test Output</STRONG> "); out.println(" </FONT> "); out.println(" </CENTER> "); out.println(" <HR> "); out.println(" <H2>Test44 servlet : Checking Request.setAttribute, Request.getAttribute </H2> "); out.println("Setting attributes on the Request using : <br> "); out.println("req.setAttribute(\"myName\" , \"Test44\"); <BR> " ); out.println("req.setAttribute(\"setIn\" , \"Test44\"); <BR> "); out.println("req.setAttribute(\"setBy\" , \"Ramesh\"); <BR> "); req.setAttribute("myName" , "Test44"); req.setAttribute("setIn" , "Test44"); req.setAttribute("setBy" , "Ramesh"); out.println("Including the Test44Included using RequestDispatcher "); RequestDispatcher rd = req.getRequestDispatcher("/StdPostest44Included"); rd.include(req, resp ); out.println(" <HR> "); out.println(" </BODY> "); out.println(" </HTML> " ); out.flush(); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -