关于servlet语句的问题:下面代为什么会报错呢?求解释!

package Hello;

import java.io.*;
import javax.servlet.*;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class HttpHello extends HttpServlet {
public void doGet(HttpServletRequest req,HttpServletResponse res)
{

throws ServletException,IOException{
PrintWriter out=res.getWriter();
out.println("hello,http");

out.println("<html>");
out.println("<body>");
out.println("<form action= method=post>");
out.println("<table border=1 align=center>");
out.println("<tr><th colspan=2>Login interface</th><tr>");
out.println("<tr><td>UserName:</td><td><input type=text name=username></td></tr>");
out.println("<tr><td>PassWord:</td><td><input type=password name=passwd></td></tr>");
out.println("<tr><td colspan=2 align=center><input type=submit value=login></td></tr>");
out.println("</table>");
out.println("</form>");
out.println("</html>");
out.println("</body>");
}

}
}

throws ServletException,IOException{

这行下面显示错误的红线...求解

慕婉清6462132
浏览 114回答 1
1回答
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java
JavaScript