标题:求助!jsp运行错误
取消只看楼主
寒宵
Rank: 1
来 自:辽宁阜新
等 级:新手上路
帖 子:96
专家分:0
注 册:2006-2-22
 问题点数:0 回复次数:1 
求助!jsp运行错误
通过javac编译
但运行java myclass时出现
Exception   in   thread   "main"   java.lang.noclassdefoundError:myclass
搜索更多相关主题的帖子: jsp 运行 
2007-12-04 01:51
寒宵
Rank: 1
来 自:辽宁阜新
等 级:新手上路
帖 子:96
专家分:0
注 册:2006-2-22
得分:0 
package

import javax.servlet.*;
import javax.servlet.http.*;
import *;

public class HelloServlet extends HttpServlet {
    
    //Initialize global variables  
    public void init(ServletConfig config) throws ServletException {
        super.init(config);
    }
    
    //Process the HTTP Get request  
    public void doGet(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
        response.setContentType("text/html;charset=GB2312");
        PrintWriter out = response.getWriter();
        
        out.println("<html>");
        out.println("<head><title>CH2 - HelloServlet</title></head>");
        out.println("<body>");
        out.println(" Hello World <br>");
        out.println("大家好");
        out.println("</body>");
        out.println("</html>");

        out.close();
    }
    
    //Get Servlet information
    public String getServletInfo() {
        return " Information";
    }
}

初学照着书上的方法运行的!还是不好用!

电脑一开一关,一天过去了
2007-12-04 20:07



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-190201-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.012267 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved