servlet问题:HTTP Status 500
代码:packagecom.l;importjavax.servlet.*;importjava.io.*;importjavax.servlet.Servlet;imp...
代码:
package com.l;
import javax.servlet.*;import java.io.*;import javax.servlet.Servlet;import javax.servlet.ServletConfig;import javax.servlet.ServletException;import javax.servlet.ServletRequest;import javax.servlet.ServletResponse;import java.io.IOException;
public class Hello implements Servlet{ public void init(ServletConfig parm1) throws ServletException { System.out.println("Init it."); } public ServletConfig getServletConfig() { return null; } public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException { System.out.println("Hello World!"); PrintWriter pw = res.getWriter(); pw.println("Hello World!"); }
public String getServletInfo() { return ""; }
public void destroy() { System.out.println("Destory!"); } }
新手求指导... 展开
package com.l;
import javax.servlet.*;import java.io.*;import javax.servlet.Servlet;import javax.servlet.ServletConfig;import javax.servlet.ServletException;import javax.servlet.ServletRequest;import javax.servlet.ServletResponse;import java.io.IOException;
public class Hello implements Servlet{ public void init(ServletConfig parm1) throws ServletException { System.out.println("Init it."); } public ServletConfig getServletConfig() { return null; } public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException { System.out.println("Hello World!"); PrintWriter pw = res.getWriter(); pw.println("Hello World!"); }
public String getServletInfo() { return ""; }
public void destroy() { System.out.println("Destory!"); } }
新手求指导... 展开
1个回答
Storm代理
2023-08-29 广告
2023-08-29 广告
"StormProxies是全球大数据IP资源服务商,其住宅代理网络由真实的家庭住宅IP组成,可为企业或个人提供满足各种场景的代理产品。点击免费测试(注册即送1G流量)StormProxies有哪些优势?1、IP+端口提取形式,不限带宽,I...
点击进入详情页
本回答由Storm代理提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询