Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Application Server » Tomcat  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
作者 急 急 急 急求救——tomcat5.5 下的 java出错
chenyang





发贴: 4
积分: 0
于 2005-10-11 08:55 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
在调试tomcat 的时候出现了servlet调试程序出错的问题,
程序如下:
package test;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class Test extends HttpServlet {
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
PrintWriter out=response.getWriter();
out.println("<html><body><h1>This is a servlet test.</h1></body></html>");
out.flush();
}
}

出错情况在附件中。

我初次接触,希望大家帮帮我。谢谢。



作者 Re:急 急 急 急求救——tomcat5.5 下的 java出错 [Re:chenyang]
zerol

Soul of New Machine



发贴: 593
积分: 61
于 2005-10-11 22:33 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
指定classpath , 你的servlet 需要 servlet-api.jar
E.G.($TOMCAT_HOME 是tomcat 的安装路径) :

javac -classpath .;c:\$TOMCAT_HOME\common\lib\servlet-api.jar ...

Best Regards.



★☆ The Truth Lies Somewhere In The Middle ☆★ 

flat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923