On Wed, 29 Jul 1998, Doug Welzel wrote:

> Can you tell me exactly what your CLASSPATH variable is?  (just to make
> sure)
>
> > -----Original Message-----
> > From: Alejandro Canales [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, July 29, 1998 5:07 AM
> > To: Doug Welzel
> > Subject: Re: Servlets on Linux
> >
> >
> >
> >     I follow your instructions as you (and many more guys) send me.
> > I got this problem: When I can't compile this simple program:
> >
> > import java.io.*;
> > import java.servlet.*;
> > import java.servlet.http.*;
> >
> >
> > public class SimpleServlet extends HttpServlet
> > {
> >   public void service(HttpServletRequest req, HttpServletResponse res)
> >        throws ServletException, IOException
> >   {
> >     res.setContentType("text/html");
> >     PrintWriter out = res.getWriter();
> >     out.println("<HEAD><TITLE>Simple Servlet </TITLE></HEAD><BODY>");
> >     out.println("<h1> SimpleServlet Output</h1>");
> >     out.println("<p>This is from SimpleServlet.");
> >     out.close();
> >   }
> >   public String getServletInfo()
> >   {
> >     return "A simple Servlet";
> >   }
> > }
> >
> > this are the errors:
> >
> > $ javac Servlet1.java
> > Servlet1.java:2: Package java.servlet not found in import.
> > import java.servlet.*;
> >        ^
> > Servlet1.java:3: Package java.servlet.http not found in import.
> > import java.servlet.http.*;
> >        ^
> > Servlet1.java:6: Superclass HttpServlet of class SimpleServlet not
> > found.
> > public class SimpleServlet extends HttpServlet
> >                                    ^
> > 3 errors
> > <---
> > I carefully set CLASSPATH as you tell me. What should I do???
> > I think apache is well configurated. But I need to test it, can you
> > send me one simple servlet and how I run it???
> >
> >
> >     Sincerely
> >     A Canales


        My CLASSPATH is set as follows:
--->
        $ echo $CLASSPATH
        /usr/local/java/lib/classes.zip:/usr/local/java/jserv/servclasses.zip:
/usr/local/java/jserv/src:/usr/local/java/lib
<---
        I put the jsdk.jar file in this directory:
--->
        $ ls /usr/local/java/lib/
appletviewer.properties       font.properties.zh_EUC_CN
awt.properties                font.properties.zh_TW_Big5
classes.zip                   font.properties.zh_TW_EUC_TW
content-types.properties      i386
font.properties               i486
font.properties.cs            i586
font.properties.el            i686
font.properties.hu            jsdk.jar
font.properties.ja            org
font.properties.ko            psfont.properties.ja
font.properties.lt            rmic.properties
font.properties.lv            security
font.properties.pl            serialver.properties
font.properties.ru            servclasses.zip
font.properties.tr
<----

        I untar the JDSK for solaris and copy the file "jsdk.jar" into
/usr/local/java/lib. 
        I am using JDK1.1.6 and seem that work well (I compile some little
programs), but in the Instalation instrucions the JDK says that CLASSPATH
is no longer needed, in fact I can compile programs in JDK1.1.6 whitout
setting CLASSPATH, I don't know what I do wrong...
        Can someone help me???

        Sincerely
        A Canales




Reply via email to