ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Russ Baker <rba...@NETdelivery.com>
Subject RE: Package javax.servlet.http not found in import
Date Mon, 04 Jun 2001 16:04:53 GMT
Pinar,

The "javax stuff" usually resides in a couple of jar files, one of them
being servlet.jar, which is the one that the compiler is complaining about.
If you are using tomcat, it usually is in TOMCAT_HOME\lib directory, where
TOMCAT_HOME is where ever you placed tomcat.  If you are using win 32 system
(microsoft windows NT, 2000 or egads 98) then in your search to find the
servlet.jar file and make sure that it is in your classpath.  Also, if
someone has made a text file with all of the classes/jar files in it, make
sure that it reflects what is on your machine, otherwise your looking for
files that don't exist.

-Russ

-----Original Message-----
From: Pinar Bicioglu [mailto:pinarbici@hotmail.com]
Sent: Monday, June 04, 2001 9:50 AM
To: ant-user@jakarta.apache.org
Subject: RE: Package javax.servlet.http not found in import






>Looks like your classpath is screwed up.  Make sure that you have not made 
>a
>spelling error in your classpath, and most of all, make sure that the case
>matches what your system has, remember java is case sensitive.  What I
>usually do is to open a dos window (if you are using dos) and go to the
>directory that I have the classes in.
Do you mean the directory that has .class files in it ? Because the .jar 
file I have that consists of libraries in 
d:\ap20\websrc\WEB-INF\lib\struts.jar as i wrote in classpath attribute.

Then I copy from the screen the exact
>path and the name of the class or jar file that I want in the classpath.  I
>would start with the jar file that has the javax stuff in it and see if 
>that
>works, then keep going until all the error messages have disappeared.
This is where I get confused actually. The project has been written by 
someone not myself :) So there is only one .jar file. I don't really now 
what this "javax stuff" is and where it is ? What should i specify in my 
classpath ?? .jar files or .class files ?
Also,
>you can echo your classpath before you do the javadoc command by doing 
>this:
>
><echo message="${classpath}/>
>

Thanks for your help :)

>-----Original Message-----
>From: Pinar Bicioglu [mailto:pinarbici@hotmail.com]
>Sent: Friday, June 01, 2001 5:05 PM
>To: ant-user@jakarta.apache.org
>Subject: Package javax.servlet.http not found in import
>
>
>I am going crazy here. I posted tons of messages regarding my problem that 
>I
>
>haven't been able to resolve for three days. Everybody tried to help me
>thanks to all of you. But the problem still exists....
>
>All I want to do is to generate a javadoc. I have two source files in which
>I import one package that is not standard. (it is written by someone from
>our office)
>
>
>here is the lates version of my javadoc target and the error code it
>generates...
>
><!-- Javadoc target -->
>    <target name="javadoc" depends="packages" >
>
>     <property name="root"  value="org.apache.struts" />
>     <property name="src"   value="d:\ap20\java" />
>     <echo message="${my.classpath.txt}"/>
>        <javadoc sourcepath="${src}"
>          destdir="${javadoc.home}"
>          packagenames="${root}.*"
>          classpath="d:\ap20\websrc\WEB-INF\lib\struts.jar"
>          author="true"
>          version="true"
>          use="true"
>          windowtitle="${app.name} ${version} API"
>          doctitle="${app.name}" />
>          </target>
>
>error message:
>
>D:\ap20>ant javadoc
>Buildfile: build.xml
>
>prepare:
>
>compile:
>
>packages:
>
>javadoc:
>      [echo] ${my.classpath.txt}
>   [javadoc] Generating Javadoc
>   [javadoc] Javadoc execution
>   [javadoc] Loading source files for package org.apache.struts.form...
>   [javadoc] Constructing Javadoc information...
>   [javadoc] D:\ap20\java\org\apache\struts\form\ValidateForm.java:13:
>Package javax.servle
>t.http not found in import.
>   [javadoc] import javax.servlet.http.*;
>   [javadoc]        ^
>   [javadoc] javadoc: warning - Cannot find class
>javax.servlet.http.HttpServlet
>   [javadoc] javadoc: warning - Cannot find class
>javax.servlet.ServletRequest
>   [javadoc] javadoc: warning - Cannot find class
>javax.servlet.http.HttpServletRequest
>   [javadoc] javadoc: warning - Cannot find class
>javax.servlet.ServletResponse
>   [javadoc] javadoc: warning - Cannot find class
>javax.servlet.ServletException
>   [javadoc] javadoc: warning - Cannot find class
>javax.servlet.http.HttpServletResponse
>   [javadoc] javadoc: warning - Import not found:
>javax.servlet.RequestDispatcher - ignorin
>g!
>   [javadoc] javadoc: warning - Import not found:
>javax.servlet.ServletException - ignoring
>!
>   [javadoc] javadoc: warning - Import not found:
>javax.servlet.http.HttpServletRequest - i
>gnoring!
>   [javadoc] javadoc: warning - Import not found:
>javax.servlet.http.HttpSession - ignoring
>!
>   [javadoc] javadoc: warning - Import not found:
>javax.servlet.http.HttpServletResponse -
>ignoring!
>   [javadoc] javadoc: warning - Cannot find class javax.sql.DataSource
>   [javadoc] javadoc: warning - Cannot find class org.xml.sax.HandlerBase
>   [javadoc] javadoc: warning - Cannot find class
>javax.servlet.http.HttpServlet
>   [javadoc] javadoc: warning - Cannot find class org.xml.sax.SAXException
>   [javadoc] javadoc: warning - Cannot find class
>org.xml.sax.SAXParseException
>   [javadoc] javadoc: warning - Cannot find class 
>javax.xml.parsers.SAXParser
>   [javadoc] javadoc: warning - Cannot find class org.xml.sax.InputSource
>   [javadoc] javadoc: warning - Cannot find class org.xml.sax.Locator
>   [javadoc] javadoc: warning - Cannot find class org.xml.sax.AttributeList
>   [javadoc] javadoc: warning - Cannot find class org.xml.sax.HandlerBase
>   [javadoc] Building tree for all the packages and classes...
>   [javadoc] Building index for all the packages and classes...
>   [javadoc] Building index for all classes...
>   [javadoc] Generating
>D:\Tomcat\jakarta-tomcat-3.2.2b3\webapps\struts\javadoc\stylesheet.
>css...
>   [javadoc] 21 warnings
>
>BUILD SUCCESSFUL
>
>Total time: 7 seconds
>
>and "my.classpath.txt" consists of .jar files as below...
>
>myclasspath="d:\jdk1.2.2\lib\tools.jar;d:\jakarta-ant-1.3\lib\ant.jar;D:\Bi
n
>\sb\classes\parser.jar;D:\jdk1.2.2\lib\tools.jar;d:\RECYCLER\S-1-5-21-11698
9
>744-1368684792-1540833222-1308\DD1.2B3\lib"
>
>
>thanks a lot...........
>
>
>
>_________________________________________________________________
>Get your FREE download of MSN Explorer at http://explorer.msn.com

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

Mime
View raw message