When you say you are using J2EE, I suppose you have downloaded Sun J2SDKSE 1.3 (i.e. JDK 1.3) and/or J2SDKEE 1.3. This allows you to develop your servlets using the Sun J2EE packages. Once you have developped your servlet, if you want to run it, you must use a servlet engine (as Tomcat) or, to be more agressivly J2EE oriented, a J2EE certified Application Server. An application server allows you to deploy and use all 'J2EE' objects (servlets, JavaServer Pages, Enterprise Java Beans, ...) that you create using the Sun packages. This Application server can be at the same time your Web server (this is especially the case for Orion application server) or not (Tomcat is a servlet engine and Apache is a web server, both coming from the Jakarta project). Your web server is supposed to communicate with your application server in order to use the objects you deployed on it. Each application server have its own deployement process (this includes the paths where you have to put the classes you developped and you want to run, such as your servlet). Without such an architecture, I do not know how to run a servlet... 

解决方案 »

  1.   

    我用的是J2sdkEE1.3
    它本身具备webserver功能
    我做了个helloworld的ejb试验成功
    但是我用deploytool 把servlet类加入一个新的application(只有这一个servelet)后
    调不出来它
    我怀疑是我不知道如何正确的把servlet加入application
    该servelet只是响应盖doGet请求,显示个hello world
    能不能告诉我需要怎么配和怎么从浏览器里调
      

  2.   

    拜托拜托
    只要成功给分绝对是小case
      

  3.   

    1.做了个helloworld的ejb试验成功?ejb只是个标准耶,我们只能说“我们的产品附和ejb标准",哪来的“做了个ejb”呢?
    :)
    ejb的implementation method没有规定,目前sun推荐是用jdl+rmi,你怎么用的呢?2.把servlet加入application?没开玩笑吧?servlet只是server端运行的服务响应程序而已,由服务器调用(tomcat,eg),怎能加入application?3.至于"需要怎么配和怎么从浏览器里调 "
    你装了tomcat后看一看doc就可已了,super foolproof.装了jbuilder4.0,也就会有tomcat
      

  4.   

    你有J2EE开发手册的书吗?是SUN公司的,你可以去下,上面有介绍你怎么用SERVLET的,我原来对照手册配成功过啊!
    你看看你的WEB CONTENT ROOT是不是配成功了再用host:8000/<content root>/<html文件>
      

  5.   

    http://java.sun.com/docs/books/tutorial/servlets/index.html