织梦CMS - 轻松建站从此开始!

罗索

当前位置: 主页>杂项技术>JAVA>

servlet 编译的问题

罗索客 发布于 2002-09-27 11:54 点击:次 
编译下列程序时发生错误,说javax.servlet.*。。。。不能解析。
TAG:

我编译下列程序时发生错误,说javax.servlet.*。。。。不能解析。
小弟是个新手,不大明白,还望各位大侠帮帮忙
import java.io.*;
import java.text.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;

/**
* The simplest possible servlet.
*
* @author James Duncan Davidson
*/

public class HelloWorldExample extends HttpServlet { 

    public void doGet(HttpServletRequest request,
                      HttpServletResponse response)
        throws IOException, ServletException
    {
        ResourceBundle rb =
            ResourceBundle.getBundle("LocalStrings",request.getLocale());
        response.setContentType("text/html");
        PrintWriter out = response.getWriter();

        out.println("");
        out.println("");

     String title = rb.getString("helloworld.title");

     out.println("");
        out.println("");
        out.println("");
        out.println("");

// note that all links are created to be relative. this
// ensures that we can move the web application that this
// servlet belongs to to a different place in the url
// tree and not have any harmful side effects.

        // XXX
        // making these absolute till we work out the
        // addition of a PathInfo issue

     out.println("《a href="\\"/examples/servlets/helloworld.html\\""》");
        out.println("《img height="24" alt="" src="\\"/examples/images/code.gif\\"" /》《/a》");
        out.println("《a href="\\"/examples/servlets/index.html\\""》");
        out.println("《img height="24" alt="" src="\\"/examples/images/return.gif\\"" /》《/a》");
        out.println("

" + title + "

");
        out.println(""); 
        out.println("");
    }
} (iwgh)
本站文章除注明转载外,均为本站原创或编译欢迎任何形式的转载,但请务必注明出处,尊重他人劳动,同学习共成长。转载请注明:文章转载自:罗索实验室 [http://www.rosoo.net/a/200209/1215.html]
本文出处:网络博客 作者:iwgh
顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 验证码:点击我更换图片
栏目列表
将本文分享到微信
织梦二维码生成器
推荐内容