Andy

I assume you get the welcome 'Congratulations' screen when you visit the
index.html web page of the JWS.

Like you I am running JWS, JDK1.2, and JSDK2.1 on NT

Re the port conflict, suggest you go to the admin tool of the JWS, log in,
choose Web Service, click manage, Setup, Network, change the port to 80, and
press Restart.  This is how my own JWS is configured.

You could, if you prefer, change the port of the jsdk2.1, by editing
default.cfg.

Here is my path: c:\JDK1.2\bin;c:\javac-ea\bin;c:\JSDK2.1;c:\MyCommands

Here is my classpath:
.;c:\jsdk2.1\servlet.jar;c:\JavaProjects\Library;d:\orant\LITE\CLASSES\OLITE
35.jar

If you quickly want to print the contents of servlet.jar, then from the
command line in that directory type: jar tf servlet.jar > prn

NB: 'c:\javac-ea\bin' refers to the early-access release of the latest
compiler; 'olite35.jar' is for my Oracle Light Database.

jsdk.jar and classes.zip relate to older software.

Suggest you try these imports:
        import javax.servlet.*;
        import javax.servlet.http.*;
        import java.io.*;


Hope this helps!!

Regards
Alan


----- Original Message -----
From: andy <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, May 29, 1999 6:24 PM
Subject: error compiling servlet


> Hello All, (& happy memorial day)
>
> I am trying to compile a simple servlet & am having trouble.
> I am running NT4 and installed the following (in this order)
>
> JavaWebServer 1.1.3
> JDK 1.2.1
> JSDK 2.1
>
>
> First question:
>
> Does the javawebserver already handle servlets, or do I need to
> run the jsdk startserver.bat program ?  The reason I ask is that
> they both seem to use the same port so I can't start them both.
>
> Next question:
>
> Upon initial load, I set my path to C:\jdk1.2.1\bin
> so that I could type "javac" on the command line without any errors.
>
> If I type C:\JavaWebServer1.1.3\servlets>javac HelloWorld.java
> I get:
>
>    HelloWorld.java:3: Package java.servlet not found in import.
>    import java.servlet.*;
>        ^
>    HelloWorld.java:4: Package javax.servlet not found in import.
>    import javax.servlet.*;
>        ^
>    HelloWorld.java:6: Superclass HttpServlet of class HelloWorld not
found.
>    public class HelloWorld extends HttpServlet {
>                                 ^
>    3 errors
>
> If I copy servlet.jar into C:\jdk1.2.1\jre\lib\ext\
> (like I saw someone say to do in another message)
> It gets rid on 1 error... now I just get:
>
>    C:\JavaWebServer1.1.3\servlets>javac HelloWorld.java
>    HelloWorld.java:3: Package java.servlet not found in import.
>    import java.servlet.*;
>        ^
>    HelloWorld.java:6: Superclass HttpServlet of class HelloWorld not
found.
>    public class HelloWorld extends HttpServlet {
>                                 ^
>    2 errors
>
> I thought it might have something to do with my classpath
> so I've been messing with it for a while, & have tried all of these
> locations in the classpath (one at a time + combinations of them)
> c:\jdk1.2.1\jre\lib\ext;
> c:\jdk1.2.1\jre\lib;
> c:\jdk1.2.1\lib;
> c:\jsdk;
> c:\jsdk\src;
> c:\javawebserver1.1.3\admin\classes;
> c:\javawebserver1.1.3\lib;
>
>
> I read about people referring to these 2 files
> but they are not on my system...
>
> jsdk.jar
> classes.zip
>
> any thoughts here ?
>
> Thanks in advance,
>
> Andy Dingfelder
> [EMAIL PROTECTED]
>
>
> I've included my code below, followed by some extra info about my system
>  that may or may not be of any help
>
>
>
> import java.io.*;
> import java.servlet.*;
> import javax.servlet.*;
>
> public class HelloWorld extends HttpServlet {
>
>     public void doGet(HttpServletRequest request, HttpServletResponse
> response)
>     throws IOException, ServletException
>     {
>         response.setContentType("text/html");
>         PrintWriter out = response.getWriter();
>         out.println("<html>");
>         out.println("<body>");
>         out.println("<head>");
>         out.println("<title>Hello World!</title>");
>         out.println("</head>");
>         out.println("<body>");
>         out.println("<h1>Hello World!</h1>");
>         out.println("</body>");
>         out.println("</html>");
>     }
> }
>
>
>
>
>
> here are all my jar files:
>
> from javawebserver
>
> C:\JavaWebServer1.1.3\jre\lib\i18n.jar
> C:\JavaWebServer1.1.3\jre\lib\javac.jar
> C:\JavaWebServer1.1.3\jre\lib\rt.jar
> C:\JavaWebServer1.1.3\lib\javac.jar
> C:\JavaWebServer1.1.3\lib\jws.jar
> C:\JavaWebServer1.1.3\lib\x509v1.jar
> C:\JavaWebServer1.1.3\servletbeans\SampleBean.jar
> C:\Program Files\JavaSoft\JRE\1.2\lib\i18n.jar
> C:\Program Files\JavaSoft\JRE\1.2\lib\jaws.jar
> C:\Program Files\JavaSoft\JRE\1.2\lib\rt.jar
> C:\Program Files\JavaSoft\JRE\1.2\lib\ext
> C:\Program Files\JavaSoft\JRE\1.2\lib\iiimp.jar
>
> from jdk
>
> C:\jdk1.2.1\src.jar
>
C:\jdk1.2.1\doc\jdk1.2.1\docs\guide\awt\demos\lightweight\Gauge\ExampleApple
> t.jar
>
C:\jdk1.2.1\doc\jdk1.2.1\docs\guide\awt\demos\lightweight\OpenlookButtons\Ex
> ampleApplet.jar
>
C:\jdk1.2.1\doc\jdk1.2.1\docs\guide\awt\demos\lightweight\RoundButtons\Examp
> leApplet.jar
>
C:\jdk1.2.1\doc\jdk1.2.1\docs\guide\awt\demos\lightweight\Spinner\ExampleApp
> let.jar
> C:\jdk1.2.1\jre\lib\i18n.jar
> C:\jdk1.2.1\jre\lib\jaws.jar
> C:\jdk1.2.1\jre\lib\rt.jar
> C:\jdk1.2.1\jre\lib\ext\iiimp.jar
> C:\jdk1.2.1\lib\dt.jar
> C:\jdk1.2.1\lib\servlet.jar
> C:\jdk1.2.1\lib\tools.jar
>
> from jsdk
>
> C:\jsdk\server.jar
> C:\jsdk\servlet.jar
>
> (no jsdk.jar)
>
>
> here are all my zip files
>
>
> C:\JavaWebServer1.1.3\admin\classes\jwsadmin.zip
>
C:\jdk1.2.1\doc\jdk1.2.1\docs\guide\awt\demos\lightweight\Gauge\ExampleApple
> t.zip
>
C:\jdk1.2.1\doc\jdk1.2.1\docs\guide\awt\demos\lightweight\OpenlookButtons\Ex
> ampleApplet.zip
>
C:\jdk1.2.1\doc\jdk1.2.1\docs\guide\awt\demos\lightweight\RoundButtons\Examp
> leApplet.zip
>
C:\jdk1.2.1\doc\jdk1.2.1\docs\guide\awt\demos\lightweight\Spinner\ExampleApp
> let.zip
> C:\jdk1.2.1\doc\jdk1.2.1\docs\guide\rmi\archives\activation.zip
> C:\jdk1.2.1\doc\jdk1.2.1\docs\guide\rmi\archives\getStart.zip
> C:\jdk1.2.1\doc\jdk1.2.1\docs\guide\rmi\archives\sockets.zip
> C:\jdk1.2.1\doc\jdk1.2.1\docs\guide\rmi\code\XorHelloExample.zip
> C:\jdk1.2.1\doc\jdk1.2.1\docs\guide\rmi\phaosrmi\PhaosRMIExample.zip
>
> (no classes.zip)
>
>
___________________________________________________________________________
> 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

Reply via email to