Servlet入门学习(二)

匿名 (未验证) 提交于 2019-12-03 00:37:01
public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException {         String userName = req.getParameter("userName");         System.out.println("Hello"+userName); }
<body>     This is 404 Page. <br> </body>
<body>     This is error Page. <br> </body>
<error-page>     <error-code>404</error-code>     <location>/WEB-INF/jsp/404.jsp</location> </error-page> <error-page>     <error-code>java.lang.Exception</error-code>     <location>/WEB-INF/jsp/error.jsp</location> </error-page> <servlet> . . .
public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException {         String userName = req.getParameter("userName");         System.out.println("Hello"+userName);         throw new ServletException("test"); }
转载请标明出处:Servlet入门学习(二)
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!