You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jim Bartram <jb...@quadrivium-labs.com> on 2000/11/26 23:38:41 UTC

Need some basic information

(Disclaimer: I've spent hours rummaging in FAQs, Archives, and other
documents, and tried countless suggestions gleaned thereby. No luck.)

I've successfully installed Tomcat 3.1 and Apache on NT 4.0, and made them
work together to the extent that I can use the examples.

However, I want to do the following very simple and concrete thing:

I have a servlet called "HelloWorld.java", which I have compiled. I would
like to run it from my web browser. I would really like to know EXACTLY
what to do to be able to do this, short of creating WAR files and directory
structures. This is a minimalist question -- I simply want to know what is
the most lightweight way to play with developing servlets.

1. Where do I put my servlet? Do I need to compile it first?
2. Exactly what lines do I need to add to conf\web.xml?
3. What other configuration tweaks need to be done?
4. How do I run the servlet in the browser (I can access the examples at:
   http://127.0.0.1/examples/servlets/)

IMHO, the documents available need a few concise "recipes" for commonly
used scenarios. If I can collect enough information I'll publish what I've
learned.

Thanks,

--Jim Bartram



Re: Need some basic information

Posted by Jim Bartram <jb...@quadrivium-labs.com>.
Thanks, Ken. I just tried your suggestion and it works fine.

I'm still interested in a slightly more general method. Suppose I wanted to
create my own directory and use it as the base for my servlet experiments.
Can I do this so that a URL like: http:\localhost\jimb\HelloWorld will run
my servlet? If so, how?

In addition to being able to get something up and running quickly, I'm also
interested in learning something from a slightly more complex example.

Thanks!

--Jim

At 03:53 PM 11/26/00 -0800, Ken wrote:
>The simplest way is to just use the existing setup. compile your servlets
>and place them in
>$tomcat-root/examples/web-inf/classes/
>Then you can access them from the /examples URL
>Ken
>
>----- Original Message -----
>From: "Jim Bartram" <jb...@quadrivium-labs.com>
>To: <to...@jakarta.apache.org>
>Sent: Sunday, November 26, 2000 2:38 PM
>Subject: Need some basic information
>
>
>> (Disclaimer: I've spent hours rummaging in FAQs, Archives, and other
>> documents, and tried countless suggestions gleaned thereby. No luck.)
>>
>> I've successfully installed Tomcat 3.1 and Apache on NT 4.0, and made them
>> work together to the extent that I can use the examples.
>>
>> However, I want to do the following very simple and concrete thing:
>>
>> I have a servlet called "HelloWorld.java", which I have compiled. I would
>> like to run it from my web browser. I would really like to know EXACTLY
>> what to do to be able to do this, short of creating WAR files and
>directory
>> structures. This is a minimalist question -- I simply want to know what is
>> the most lightweight way to play with developing servlets.
>>
>> 1. Where do I put my servlet? Do I need to compile it first?
>> 2. Exactly what lines do I need to add to conf\web.xml?
>> 3. What other configuration tweaks need to be done?
>> 4. How do I run the servlet in the browser (I can access the examples at:
>>    http://127.0.0.1/examples/servlets/)
>>
>> IMHO, the documents available need a few concise "recipes" for commonly
>> used scenarios. If I can collect enough information I'll publish what I've
>> learned.
>>
>> Thanks,
>>
>> --Jim Bartram
>>
>>
>>
>


Re: Need some basic information

Posted by Ken <ka...@pacific.net>.
The simplest way is to just use the existing setup. compile your servlets
and place them in
$tomcat-root/examples/web-inf/classes/
Then you can access them from the /examples URL
Ken

----- Original Message -----
From: "Jim Bartram" <jb...@quadrivium-labs.com>
To: <to...@jakarta.apache.org>
Sent: Sunday, November 26, 2000 2:38 PM
Subject: Need some basic information


> (Disclaimer: I've spent hours rummaging in FAQs, Archives, and other
> documents, and tried countless suggestions gleaned thereby. No luck.)
>
> I've successfully installed Tomcat 3.1 and Apache on NT 4.0, and made them
> work together to the extent that I can use the examples.
>
> However, I want to do the following very simple and concrete thing:
>
> I have a servlet called "HelloWorld.java", which I have compiled. I would
> like to run it from my web browser. I would really like to know EXACTLY
> what to do to be able to do this, short of creating WAR files and
directory
> structures. This is a minimalist question -- I simply want to know what is
> the most lightweight way to play with developing servlets.
>
> 1. Where do I put my servlet? Do I need to compile it first?
> 2. Exactly what lines do I need to add to conf\web.xml?
> 3. What other configuration tweaks need to be done?
> 4. How do I run the servlet in the browser (I can access the examples at:
>    http://127.0.0.1/examples/servlets/)
>
> IMHO, the documents available need a few concise "recipes" for commonly
> used scenarios. If I can collect enough information I'll publish what I've
> learned.
>
> Thanks,
>
> --Jim Bartram
>
>
>