Steven Hawkes wrote:
>
> I compiled the example under JBuilder 3.
> I then started the ServletRunner as provided
> in the JSDK2.0 successfully.
>
> Then I have a problem. The instructions say
> Copy the Servlet to a directory but what is the
> output of the compilation, the html, the class or
> the java file, what must I copy all three files?.
The servlet you write is code that you want to be executed. The servlet runner
(through the Java Virtual Machine) can only execute class files. Copy the class
files.
> My next question is when I load the examples
> provided with in the JSDK2.0 and try to compile
> them they compile successfully but what is the
> output of the compilation. I cannot locate any
> HTML file from the JBuilder.
If you are using JBuilder, you should know that when you compile a .java source
file, the output is a .class file.
> My final question is with regard to the Browser
> request line. The example states I should enter
> http://localhost:<Port>/servlet/<Servlet Name>
>
> How does the ServletRunner know about the
> Servlet entry above as I cannot see this announced
> when it starts and how does this relate to the
> examples directory where the test files are located.
The servlet runner is a server. You don't need to tell it about the Browser
ahead of time. When you type in the URL into the browser, the browser knows to
how to make a network connection to local host on port <Port>. The servlet
runner gets the information from the browser over this network connection from
the browser.
You do need to tell servlet runner where to get the class files it needs. It
looks for java classes on the classpath you have defined. If you are actually
using servletrunner, you tell it in the command line where the servlets are
located.
Be sure to check out the Servlet FAQ for more information:
http://www.purpletech.com/servlet-faq
___________________________________________________________________________
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