编译beans时,出现"包 javax.servlet 不存在"错误提示,请问怎样解决???

AdenLi 2001-08-23 08:45:06
在编译beans时,出现"包 javax.servlet 不存在","包 javax.servlet.http不存在"的错误提示。请问这两个软件包是不是存在jdk里?为什么会出现这种问题?怎样解决???各位帮帮忙呀,我刚学jsp不久的,别再让问题打击我这弱小的心灵!
...全文
7802 点赞 收藏 4
写回复
4 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
AdenLi 2001-08-23
谢谢你们!!!
回复
54sunboy 2001-08-23
把以下包加到CLASSPATH中就可以了!
c:\tomcat\lib\ant.jar;
c:\tomcat\lib\jasper.jar;
c:\tomcat\lib\jaxp.jar;
c:\tomcat\lib\parser.jar;
c:\tomcat\lib\servlet.jar;
c:\tomcat\lib\webserver.jar;
回复
lci21 2001-08-23
赞同楼上的!
这里有很多相关的问题,你搜索一下!会找到很多。

你需要在CLASSPATH中指明javax.servlet包。
你用什么服务器?我的tomcat是3.2.1版本,我的servlet路径设的为:
E:\TOMCAT\lib\servlet.jar;

servlet.jar包含的类有:

META-INF/
META-INF/MANIFEST.MF
javax/
javax/servlet/
javax/servlet/http/
javax/servlet/jsp/
javax/servlet/jsp/tagext/
javax/servlet/http/Cookie.class
javax/servlet/http/HttpServlet.class
javax/servlet/http/NoBodyResponse.class
javax/servlet/http/NoBodyOutputStream.class
javax/servlet/http/HttpServletRequest.class
javax/servlet/http/HttpServletResponse.class
javax/servlet/http/HttpSession.class
javax/servlet/http/HttpSessionBindingEvent.class
javax/servlet/http/HttpSessionBindingListener.class
javax/servlet/http/HttpSessionContext.class
javax/servlet/http/HttpUtils.class
javax/servlet/http/LocalStrings.properties
javax/servlet/http/LocalStrings_es.properties
javax/servlet/jsp/tagext/BodyContent.class
javax/servlet/jsp/tagext/BodyTag.class
javax/servlet/jsp/tagext/BodyTagSupport.class
javax/servlet/jsp/tagext/Tag.class
javax/servlet/jsp/tagext/TagAttributeInfo.class
javax/servlet/jsp/tagext/TagData.class
javax/servlet/jsp/tagext/TagExtraInfo.class
javax/servlet/jsp/tagext/TagInfo.class
javax/servlet/jsp/tagext/TagLibraryInfo.class
javax/servlet/jsp/tagext/TagSupport.class
javax/servlet/jsp/tagext/VariableInfo.class
javax/servlet/jsp/HttpJspPage.class
javax/servlet/jsp/JspEngineInfo.class
javax/servlet/jsp/JspException.class
javax/servlet/jsp/JspFactory.class
javax/servlet/jsp/JspPage.class
javax/servlet/jsp/JspTagException.class
javax/servlet/jsp/JspWriter.class
javax/servlet/jsp/PageContext.class
javax/servlet/GenericServlet.class
javax/servlet/RequestDispatcher.class
javax/servlet/Servlet.class
javax/servlet/ServletConfig.class
javax/servlet/ServletContext.class
javax/servlet/ServletException.class
javax/servlet/ServletInputStream.class
javax/servlet/ServletOutputStream.class
javax/servlet/ServletRequest.class
javax/servlet/ServletResponse.class
javax/servlet/SingleThreadModel.class
javax/servlet/UnavailableException.class
javax/servlet/LocalStrings.properties
回复
jeston 2001-08-23
jdk中没有,如果你有tomcat有tomcat/lib/servlet中有,那你在classpath设置一下呀
回复
相关推荐
发帖
Web 开发
创建于2007-09-28

8.0w+

社区成员

Java Web 开发
申请成为版主
帖子事件
创建了帖子
2001-08-23 08:45
社区公告
暂无公告