The correct "main" class to run the servlet runner from JSDK 2.0 is:
sun.servlet.http.HttpServer
This is documented, and is also transparent if you use the "servletrunner"
command as described in the documentation. You will also find in the docs the
fact that you need to include the "jsdk.jar" file from the "lib" directory on
your CLASSPATH -- it includes both the basic servlet classes (javax.servlet.*
and javax.servlet.http.*) and the Sun implementation of the servlet runner.
You don't need source code or APIs for the internal Sun classes (sun.*) to do
this.
Craig McClanahan
"Ko, Eunice (PBIS-ek3651)" wrote:
> Chris,
> I set jsdk2.0/lib or jsdk2.0/lib/jsdk.jar in the CLASSPATH. I
> also tried to use javax.servlet.http.
> Under javax.servlet.http, there is not main method. I used the
> "find in files". The javax.servlet.http has no HttpServer.class either
> and this is the class contains the main method.
> The servlet can not run. It needs to know where the class
> contains the main.
> Yes, the sun.* is an internal package. Does it mean sun stopped
> the open source code police in JSDK2.0?
> Thanks.
> Eunice Ko
> PBIS, Information Technology
>
> > -----Original Message-----
> > From: Chris Pratt [SMTP:[EMAIL PROTECTED]]
> > Sent: Wednesday, March 17, 1999 10:25 AM
> > To: Ko, Eunice (PBIS-ek3651); [EMAIL PROTECTED]
> > Subject: Re: HttpServer class in JSDK2.0
> >
> > You shouldn't have to unjar the file, just place the jar file in your
> > CLASSPATH. As for the sun.servlet.http package, I believe it was
> > renamed to
> > javax.servlet.http to conform to the new Java Extension Framework.
> > Any
> > package that starts sun.* is an sun internal package and shouldn't be
> > used
> > directly, use the javax.servlet.http package, you'll be happy you did
> > down
> > the line.
> > (*Chris*)
> >
> > ----- Original Message -----
> > From: Ko, Eunice (PBIS-ek3651) <[EMAIL PROTECTED]>
> > To: 'Chris Pratt' <[EMAIL PROTECTED]>;
> > <[EMAIL PROTECTED]>
> > Sent: Wednesday, March 17, 1999 10:20 AM
> > Subject: RE: HttpServer class in JSDK2.0
> >
> >
> > >Chris,
> > > Thanks. After I extract the classes from jsdk.jar, then I found the
> > >HttpServer.class under sun.servlet.http. I made the SessionServlet
> > example
> > >work.
> > > However, I can not find the source code for the sun.servlet.http
> > >package that existed in jsdk1.0.1. jsdk2.0 only has source code for
> > >javax.servlet.http.
> > > Do you know where I can down load the source code for
> > >sun.servlet.http?
> > > Thanks again.
> > >
> > >Eunice Ko
> > >PBIS, Information Technology
> > >
> > >
> > >
> > >> -----Original Message-----
> > >> From: Chris Pratt [SMTP:[EMAIL PROTECTED]]
> > >> Sent: Tuesday, March 16, 1999 9:59 PM
> > >> To: [EMAIL PROTECTED]
> > >> Subject: Re: HttpServer class in JSDK2.0
> > >>
> > >> I believe you should use javax.servlet.http, which is contained in
> > the
> > >> jsdk.jar file you received with jsdk2.0.
> > >> (*Chris*)
> > >> ----- Original Message -----
> > >> From: Ko, Eunice (PBIS-ek3651) <[EMAIL PROTECTED]>
> > >> To: <[EMAIL PROTECTED]>
> > >> Sent: Tuesday, March 16, 1999 4:07 PM
> > >> Subject: HttpServer class in JSDK2.0
> > >>
> > >>
> > >> >When I download the jsdk2.0, I can not find the sun.servlet.http
> > package
> > >> >which contains the Http.Server.
> > >> >Where I can down load it?
> > >> >Thanks in advance.
> > >> >
> > >> >Eunice Ko
> > >> >PBIS, Information Technology
> > >> >
> > >>
> > >_____________________________________________________________________
> > ____
> > >> __
> > >> >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
___________________________________________________________________________
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