Deploying a simple servlet

2004-03-02 Thread Leydhershnayder, Leon A.
I'm new to tomcat and am trying to run a very simple hello world type of
servlet.  I've configured the web.xml to mimic a similar servlet in tomcat
examples.  Still while all the example servlets from tomcat work mine fails
to run.

I receive the following message:

HTTP Status 404 - /MyApp/servlet/Testing

I would greatly appreciate any advice.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Deploying a simple servlet

2004-03-02 Thread Shapira, Yoav

Hi,
If your servlet class name is com.yourcompany.YourServlet, add the
following to your web.xml:
servlet
  servlet-nameYourServlet/servlet-name
  servlet-classcom.yourcompany.YourServlet/servlet-class
/servlet

servlet-mapping
  servlet-nameYourServlet/servlet-name
  url-pattern/servlet/Testing/url-pattern
/servlet-mapping

Make sure the compiled servlet class is under the appropriate directory
of your app's WEB-INF/classes directory or packaged in a jar in
WEB-INF/lib.  Restart tomcat.  If your app is named MyApp, you will be
able to access your servlet at
http://yourhost:yourport/MyApp/servlet/Testing

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Leydhershnayder, Leon A. [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 02, 2004 11:45 AM
To: [EMAIL PROTECTED]
Subject: Deploying a simple servlet

I'm new to tomcat and am trying to run a very simple hello world type
of
servlet.  I've configured the web.xml to mimic a similar servlet in
tomcat
examples.  Still while all the example servlets from tomcat work mine
fails
to run.

I receive the following message:

HTTP Status 404 - /MyApp/servlet/Testing

I would greatly appreciate any advice.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Deploying a simple servlet

2004-03-02 Thread epyonne
Usually the problem is on your deployment descriptor.  Double-check it or
post it for help.

Thanks.


- Original Message -
From: Leydhershnayder, Leon A. [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, March 02, 2004 10:44 AM
Subject: Deploying a simple servlet


 I'm new to tomcat and am trying to run a very simple hello world type of
 servlet.  I've configured the web.xml to mimic a similar servlet in tomcat
 examples.  Still while all the example servlets from tomcat work mine
fails
 to run.

 I receive the following message:

 HTTP Status 404 - /MyApp/servlet/Testing

 I would greatly appreciate any advice.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Deploying a simple servlet

2004-03-02 Thread Christopher Schultz
Leon,

I'm new to tomcat and am trying to run a very simple hello world type of
servlet.  I've configured the web.xml to mimic a similar servlet in tomcat
examples.  Still while all the example servlets from tomcat work mine fails
to run.
I receive the following message:

HTTP Status 404 - /MyApp/servlet/Testing

I would greatly appreciate any advice.
In the newer versions of Tomcat, the 'invoker' servlet is disabled by 
default. The best way to get your servlet running it to create a 
servlet-mapping element in your web.xml and then use your mapped URL 
to access the servlet (instead of using a URL like 
/context/servlet/ClassName).

-chris


signature.asc
Description: OpenPGP digital signature


RE: Deploying a simple servlet

2004-03-02 Thread Leydhershnayder, Leon A.
The name of the servlet class is TestingServlet.class

Here are the contants of my web.xml file for this servlet.



?xml version=1.0 encoding=ISO-8859-1?

!DOCTYPE web-app
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
http://java.sun.com/dtd/web-app_2_3.dtd;

web-app
servlet
servlet-nameTesting/servlet-name
servlet-classTestingServlet/servlet-class
/servlet
/web-app




-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 02, 2004 11:48 AM
To: Tomcat Users List
Subject: RE: Deploying a simple servlet



Hi,
If your servlet class name is com.yourcompany.YourServlet, add the
following to your web.xml:
servlet
  servlet-nameYourServlet/servlet-name
  servlet-classcom.yourcompany.YourServlet/servlet-class
/servlet

servlet-mapping
  servlet-nameYourServlet/servlet-name
  url-pattern/servlet/Testing/url-pattern
/servlet-mapping

Make sure the compiled servlet class is under the appropriate directory
of your app's WEB-INF/classes directory or packaged in a jar in
WEB-INF/lib.  Restart tomcat.  If your app is named MyApp, you will be
able to access your servlet at
http://yourhost:yourport/MyApp/servlet/Testing

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Leydhershnayder, Leon A. [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 02, 2004 11:45 AM
To: [EMAIL PROTECTED]
Subject: Deploying a simple servlet

I'm new to tomcat and am trying to run a very simple hello world type
of
servlet.  I've configured the web.xml to mimic a similar servlet in
tomcat
examples.  Still while all the example servlets from tomcat work mine
fails
to run.

I receive the following message:

HTTP Status 404 - /MyApp/servlet/Testing

I would greatly appreciate any advice.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged.  This e-mail is intended only for the individual(s) to
whom it is addressed, and may not be saved, copied, printed, disclosed or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Deploying a simple servlet

2004-03-02 Thread Leydhershnayder, Leon A.
I've edited the web.xml file to contain the following:

?xml version=1.0 encoding=ISO-8859-1?

!DOCTYPE web-app
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
http://java.sun.com/dtd/web-app_2_3.dtd;

web-app
servlet
servlet-nameTesting/servlet-name
servlet-classTestingServlet/servlet-class
/servlet

servlet-mapping
servlet-nameTesting/servlet-name
url-pattern/Testing/url-pattern
/servlet-mapping

/web-app


I've set up a directory structure for this app exactly like the servlet
examples structure and after making changes to web.xml I'm recieving the
following root cause error:

java.lang.NoClassDefFoundError: TestingServlet (wrong name:
myApp/TestingServlet)

-Original Message-
From: Christopher Schultz [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 02, 2004 11:57 AM
To: Tomcat Users List
Subject: Re: Deploying a simple servlet


Leon,

 I'm new to tomcat and am trying to run a very simple hello world type of
 servlet.  I've configured the web.xml to mimic a similar servlet in tomcat
 examples.  Still while all the example servlets from tomcat work mine
fails
 to run.

 I receive the following message:

 HTTP Status 404 - /MyApp/servlet/Testing

 I would greatly appreciate any advice.

In the newer versions of Tomcat, the 'invoker' servlet is disabled by
default. The best way to get your servlet running it to create a
servlet-mapping element in your web.xml and then use your mapped URL
to access the servlet (instead of using a URL like
/context/servlet/ClassName).

-chris


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Deploying a simple servlet

2004-03-02 Thread Shapira, Yoav

Hi,

   servlet-classTestingServlet/servlet-class

The servlet-class needs to match the fully-qualified class name of your
servlet.  So if TestingServlet.java has package myApp; at the top,
servlet-class is myApp.TestingServlet.

Yoav Shapira




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Deploying a simple servlet

2004-03-02 Thread Christopher Schultz
Leon,

I've set up a directory structure for this app exactly like the servlet
examples structure and after making changes to web.xml I'm recieving the
following root cause error:
java.lang.NoClassDefFoundError: TestingServlet (wrong name:
myApp/TestingServlet)
Is your TestingServlet class in a package? If so, you need to give the 
fully-qualified class name in your web.xml file.

If it's not in a package, I've heard many reports that it simply won't 
work :(

Try putting your servlet class into a package, updating your web.xml 
file and trying again.

-chris


signature.asc
Description: OpenPGP digital signature


RE: Deploying a simple servlet

2004-03-02 Thread Leydhershnayder, Leon A.
That was the last problem.  What I did was to remove the package statement
from my java code and the servlet ran with out a problem.

Thank you all for your assistance!

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 02, 2004 1:01 PM
To: Tomcat Users List
Subject: RE: Deploying a simple servlet



Hi,

   servlet-classTestingServlet/servlet-class

The servlet-class needs to match the fully-qualified class name of your
servlet.  So if TestingServlet.java has package myApp; at the top,
servlet-class is myApp.TestingServlet.

Yoav Shapira




This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged.  This e-mail is intended only for the individual(s) to
whom it is addressed, and may not be saved, copied, printed, disclosed or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Deploying a simple servlet

2001-05-29 Thread Michael Misovec

I have Apache and Tomcat running on NT. I am trying to deploy a simple
servlet which was developed in JBuilder4. The servlet runs fine using
JBuilder's built in Tomcat.
The shtml file which I am using, displays the source in the browser
rather than the intended web page. I am not sure if this is the only
problem. I have downloaded the latest JRE from Sun and also tried
converting the html file using Sun's html converter. This did not help.

Thank you,

Mike M
757-686-2440