You won't be able to run the .class file directly.  The .class file must
be put in the WEB-INF directory of Tomcat.  The WEB-INF directory may be
in the following path: C:\jakarta-BLAHBLAH\webapps\ROOT\WEB-INF.  You'll
need to create a directory in the WEB-INF dir named "classes".  Put your
YourServlet.class file there.  You'll be able to see your results by
starting Tomcat and putting the following address in your browser:
http://localhost:8080/servlet/YourServlet.  Make sure NOT to append the
.class in YourServlet ... it won't run if u do.

Hope this helps!!

David Darby

-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]] On Behalf Of
Angela McGrenra
Sent: Tuesday, July 16, 2002 10:15 AM
To: [EMAIL PROTECTED]
Subject: Re: Getting started

Got a step further there all right - many thanks

I successfully compiled the .java file in MS DOS, got my
ExampServlet.class file and when I try to run the file - java
ExampServlet - I get

Exception in thread 'main' java.lang.NoClassDefFoundError:
javax/servlet/http/HttpServletExampServlet (wrong name:
s1314/generic/ExampServlet)
           at java.lang.ClassLoader.defineClass0(NativeMethod)
           at java.lang.ClassLoader.defineClass(Unknown Source)

etc
etc
etc like the above message

??? I think I am missing something very simple here that I may need to
download.....


>>> [EMAIL PROTECTED] 07/16/02 06:32pm >>>
What you should do is find the file servlet.jar and copy it to the
c:\jdk1.3.1\jre\lib\ext
directory.
That should solve the problem.

Tomer Cna'an

----- Original Message -----
From: "angela mcgrenra" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 16, 2002 6:00 PM
Subject: Getting started


> Hi there
> Sorry to bother ye with a very basic query but I am attempting to
compile
a
> servlet in MS DOS and am having difficulties. I have installed Tomcat
3.3.1
> and have also downloaded SUN's jdk 1.3.1. Actually, I have downloaded
so
> much software that I'm getting confused!
>
> I can compile a simple application but when I try to compile a servlet
I
get
> 6 errors of the following type:
>
> ExampServlet.java:8:cannot resolve symbol
> symbol   : class HTTPServletResponse
> location : class ExampServlet
>                       HTTPServletResponse response
>
> ExampServlet.java:9:cannot resolve symbol
> symbol   : class ServletException
> location : class ExampServlet
>                       throws ServletException, IO exception
>
> The tutorial I am following states the following :
>
> To compile the ExampServlet.java servlet you will also need to install
the
> JavaServerTM Web Development Kit and add it to your class path as you
did
> for the J2SE.
>
> Obviously I havent done this or the servlet would be working.
>
> Is there anyone out there who could give me an idea of what I'm
missing??
>
> Thaks in advance
>
> Angela
>
>
>
>
> _________________________________________________________________
> MSN Photos is the easiest way to share and print your photos:
> http://photos.msn.com/support/worldwide.aspx
>
>
________________________________________________________________________
___
> 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




Dublin to Frankfurt from EUR39 each way (excl taxes), only when you book
online at http://www.aerlingus.com

************************************************************************
***************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed.  Any review, dissemination or other use of, or taking
of any action in reliance upon, this information by persons or entities
other than the intended recipient is prohibited.If you have received
this email in error please notify the sender immediately and delete
the material.
************************************************************************
***************************************

________________________________________________________________________
___
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