请教一个简单的servlet问题..小弟初学.困恼啊!望朋友们相助.先谢啦~
我在编写一个servlet的时候..当继承HttpServlet时.就出现如下错误.是不能声明类的意思吗?怎么解决啊?跪求答案啊~~Theserializableclas...
我在编写一个servlet的时候..当继承HttpServlet时.就出现如下错误.是不能声明类的意思吗? 怎么解决啊?跪求答案啊~~
The serializable class sampleServlet does not declare a static final serialVersionUID field of type long
书上的一个例子程序.可自己却eclipse编绎不了.
sampleServlet1.java文件上有个感叹号!点到感叹号上面就有上面那些英文单词!
package ch02;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
public class sampleServlet1 extends HttpServlet
{
public void doGet(HttpServletRequest request,HttpServletResponse response)
throws ServletException,IOException
{
response.setContentType("text/html;charset=GBK");
PrintWriter out=response.getWriter();
request.setCharacterEncoding("GBK");
out.println("<html>");
out.println("<head>");
out.println("</head>");
out.println("<body>");
out.println("这是我的第一个Servlet程序");
out.println("</body>");
out.println("<html>");
out.close();
}
} 展开
The serializable class sampleServlet does not declare a static final serialVersionUID field of type long
书上的一个例子程序.可自己却eclipse编绎不了.
sampleServlet1.java文件上有个感叹号!点到感叹号上面就有上面那些英文单词!
package ch02;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
public class sampleServlet1 extends HttpServlet
{
public void doGet(HttpServletRequest request,HttpServletResponse response)
throws ServletException,IOException
{
response.setContentType("text/html;charset=GBK");
PrintWriter out=response.getWriter();
request.setCharacterEncoding("GBK");
out.println("<html>");
out.println("<head>");
out.println("</head>");
out.println("<body>");
out.println("这是我的第一个Servlet程序");
out.println("</body>");
out.println("<html>");
out.close();
}
} 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询