Hi,
I have kind of a similar setup on my machine - Java Web Server 2.0 Beta,
JSDK 2.1, JDK 1.2 etc. and it works!!
After reading all your emails and responses to those, here is all that I can
suggest. In your CLASSPATH environment variable, instead of pointing to
e:\jsdk2.1\src or e:\jsdk2.1\ , try pointing to the servlet.jar file
explicitly.
So, your CLASSPATH will have e:\jsdk2.1\servlet.jar
Then, give it a try.
Hope this helps.
-ash
Anand Sharma
O Lucent Technologies/OMD
Building 5, E-150 (Mailstop: C5-01)
Milpitas, CA 95035
Phone: (408) 324 6218
"Some people dream of success...others get up in the morning and work hard
for it"
-----Original Message-----
From: @Home [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 30, 1999 1:09 PM
To: [EMAIL PROTECTED]
Subject: Re: How to Set up Developer Environment
Thanks, this has definately moved me forward, but still have a few problems.
I have tried moving the servlet I am trying to compile into each of the
following directories and then change to that directory and try compiling
from there.
jsdk2.1
jsdk2.1\src
jsdk2.1\src\javax
jsdk2.1\src\javax\servlet
In each case, I still get the error that it cannot find of them still could
not find javax.servlet.
In the meantime, I have changed the classpath to be as follows:
e:\jsdk2.1\;e:\jsdk2.1\src\;e:\jsdk2.1\src\javax\servlet\;e:\jsdk2.1\src\jav
ax\
Looking at the contents of these directories, I find there are only .java
files and no .class files. All in all, I find the following:
jsdk2.1<DIR>
default.cfg
server.jar
servlet.jar
src<DIR>
no files
javax<DIR>
no files
servlet<DIR>
Servlet.java
GenericServlet.java
ServletRequest.java
and 9 other similar *.java files
http<DIR>
HttpServlet.java
HttpSession.java
and 7 other Http*.java files
jsp<DIR>
HttpJspPage.java
JSPPage.java
I even tried compiling some of the java files in the servlet directory.
ServletException.java, ServletInputStream.java and ServletOutputStream.java
were the only ones I could get to compile. The others all had couldn't find
some javax.* class. Some reported that they couldn't find javax.servlet.
I also tried copying the servlet.jar file into the servlet directory. No
difference (what is in the jar file? Is it relevant?
Any additional ideas?
Bill
> -----Original Message-----
> From: A mailing list for discussion about Sun Microsystem's Java Servlet
> API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Dan
> Sent: Saturday, May 01, 1999 11:27 PM
> To: [EMAIL PROTECTED]
> Subject: Re: How to Set up Developer Environment
>
>
> Hello,
>
> >
> >I would be GREATLY appreciative if someone could advise me as to:
> >
>
> I will see what I can do....
>
>
> > 1. what contents I sould put where (i.e. what directory
> structure should
>
> >be using with what files in each
>
> Your directory structure looks ok to me!
>
>
>
> > 2. what exactly my path and classpath variables should look
> like (please
> >exact entries)
>
> It is crucial that in the path variable, you include the location of java.
> Your path seems to include e:\jdk1.2.1\bin - which as far as I
> can tell is
> correct, for your setup.
>
> This should enable javac.exe to be found, so you can compile java source
> files. You confirm java is being found by "java -version" at the
> dos promp.
>
> >When I try to compile from the Command prompt I get the following error
> >messages:
> >
> >1. Package javax.servlet not found in import.
> >2. Superclass GenericServlet of class Testabc not found.
>
> That error message also indicates that java is set up corectly.
>
>
> Your problem is with java finding you JSDK (javax)....
>
>
> What you do need to do is find and get javax on the class path. You will
> then be able to compile servlets.
>
> >I have searched my entire drive for any file beginning with javax*.* and
> >found none. I suspect this is in the servlet.jar directory.
>
>
> The package javax is a directory, not a file. Java pakages (several class
> files make up a package) exist in a directory of the package name.
>
> >e.\jsdk (unzipped servlet2_1-win.zip - 366KB - 4/29/99 - into this
> >directory) Directory now is 1.11MB in 143 files in 26 folders.
> >Subdirectories under this include: etc., examples, src and
> webpages. There
> >are 9 files including servlet.jar and server.jar (I have tried
> copying the
> >servlet.jar file everywhere I could think of to see if it made a
> >difference - it didn't).
>
> On my machine javax is found in directory e:\jsdk2.0\src\javax. My
> classpath therefor has the following included: e:\jsdk2.0\src\
> You should
> find the javax directory and include the directory in which it is found in
> your classpath.
>
> [However it is worth pointing out that Java automatically adds
> the directory
> you are compiling fromto the classpath, so theroretically you can
> compile a
> servlet from the src directory without needing to change the class path.]
>
>
>
>
> > 3. what directories I should be placing my source files when I compile
> and
> >where I should place them after they have been compiled.
>
>
> As long as javax is in the classpath you can complile servlet source files
> from anywhere you like.. Then you just copy the .class files to
> the servlets
> directory on the server.
>
>
> > 4. what directory I should be in when I try to compile
>
> Generally it is a good idea to be in directory where the source
> is. [Unless
> the file is in the class path, in which case you can be anywhere.]
>
>
>
> > 5. what, if any, servlet registrations to the Java Web Server admin are
> >absolutely needed.
>
>
> You have lost me here. I was able to run servlets without touching the
> server admin, in fact, I still haven't touched it!
>
>
> > 6. how I should reference the servlets from my browser to test them.
>
>
> If your servlet has a doGet() method you can point you browser to them
> directly, noting that you use the directory "servlet" rather than
> "servlets". For example:
>
http://localhost:8080/servlet/TestServlet
>I would also be very interested in information about any web sites that
>cover installing all these components and setting up AND TESTING the
>development environment and useful tips on the mechanics of development,
>compiling, source management and deployment of servlets and JSPs.
No idea!
Hope all that helps.
Dan.
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html