Newbie here...Need help with Tomcat

2003-04-02 Thread Bryan Richardson
Hello,

I am new to the Java and Tomcat world.  I'm fairly experienced with Apache 
and Perl, but I am having to do some stuff with Tomcat and Java files that 
someone else has written.

I have a couple of questions...

If I run a version of Tomcat as a standalone web server, can I access a 
database with it or will I need to set it up with Apache to access a 
database?

I have been trying to attach Tomcat with Apache.  I used mod_jk, and I could 
run the java example programs in the "examples" folder, but it would not run 
java programs under my own folder in "webapps".  I believe I have the 
folder,web.xml,etc. set up right because it will run the java programs in my 
folder if I go directly to Tomcat via port 8080 rather than trying to run 
them through Apache.  Has anyone had this same problem or know something 
that I should be doing?

Someone please help if you can.  Thanks.  Bryan

_
Protect your PC - get McAfee.com VirusScan Online  
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

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


Re: Newbie here...Need help with Tomcat

2003-04-02 Thread John Turner
On Wed, 02 Apr 2003 01:59:48 -0700, Bryan Richardson 
<[EMAIL PROTECTED]> wrote:
If I run a version of Tomcat as a standalone web server, can I access a 
database with it or will I need to set it up with Apache to access a 
database?
Tomcat facilitates database connections just fine.  Apache is not needed 
for this.

I have been trying to attach Tomcat with Apache.  I used mod_jk, and I 
could run the java example programs in the "examples" folder, but it 
would not run java programs under my own folder in "webapps".  I believe 
I have the folder,web.xml,etc. set up right because it will run the java 
programs in my folder if I go directly to Tomcat via port 8080 rather 
than trying to run them through Apache.  Has anyone had this same problem 
or know something that I should be doing?
We'd have to know more to help.  Many people are doing this.  Relevant 
portions of httpd.conf (not the whole thing), the Context definitions in 
server.xml, etc.

Someone please help if you can.  Thanks.  Bryan

John

--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Newbie here...Need help with Tomcat

2003-04-02 Thread Bryan Richardson
When I run the examples in the "examples" foler, it looks like they all call 
a .jsp file, then maybe a .class file.  The person that wrote the program I 
am trying to run is going straight to a .class file by defining a 
servlet-class in web.xml.  Would this have anything to do with it?

I have included the mod_jk.conf-auto file in my Apache httpd.conf file.  The 
mod_jk.conf-auto file is attached to this e-mail.  I set up a context 
definition in server.xml like the following:

   
   
Would I happen to need a worker or something?  I'm still not sure what a 
worker is...

Bryan

Original Message Follows
From: John Turner <[EMAIL PROTECTED]>
Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
To: Tomcat Users List <[EMAIL PROTECTED]>
Subject: Re: Newbie here...Need help with Tomcat
Date: Wed, 02 Apr 2003 08:29:08 -0500
On Wed, 02 Apr 2003 01:59:48 -0700, Bryan Richardson 
<[EMAIL PROTECTED]> wrote:
If I run a version of Tomcat as a standalone web server, can I access a 
database with it or will I need to set it up with Apache to access a 
database?
Tomcat facilitates database connections just fine.  Apache is not needed for 
this.

I have been trying to attach Tomcat with Apache.  I used mod_jk, and I 
could run the java example programs in the "examples" folder, but it would 
not run java programs under my own folder in "webapps".  I believe I have 
the folder,web.xml,etc. set up right because it will run the java programs 
in my folder if I go directly to Tomcat via port 8080 rather than trying to 
run them through Apache.  Has anyone had this same problem or know 
something that I should be doing?
We'd have to know more to help.  Many people are doing this.  Relevant 
portions of httpd.conf (not the whole thing), the Context definitions in 
server.xml, etc.

Someone please help if you can.  Thanks.  Bryan

John

--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


_
Add photos to your messages with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail
###
# Auto generated configuration. Dated: Wed Apr 02 12:41:37 MST 2003
###
#
# The following line instructs Apache to load the jk module
#
LoadModule jk_module modules/mod_jk.dll
JkWorkersFile "D:/Tomcat/conf/workers.properties"
JkLogFile "D:/Tomcat/logs/mod_jk.log"
#
# Log level to be used by mod_jk
#
JkLogLevel error
###
# SSL configuration   #
#
# By default mod_jk is configured to collect SSL information from
# the apache environment and send it to the Tomcat workers. The
# problem is that there are many SSL solutions for Apache and as
# a result the environment variable names may change.
#
# The following (commented out) JK related SSL configureation
# can be used to customize mod_jk's SSL behaviour.
#
# Should mod_jk send SSL information to Tomact (default is On)
# JkExtractSSL Off
#
# What is the indicator for SSL (default is HTTPS)
# JkHTTPSIndicator HTTPS
#
# What is the indicator for SSL session (default is SSL_SESSION_ID)
# JkSESSIONIndicator SSL_SESSION_ID
#
# What is the indicator for client SSL cipher suit (default is SSL_CIPHER)
# JkCIPHERIndicator SSL_CIPHER
#
# What is the indicator for the client SSL certificated (default is 
SSL_CLIENT_CERT)
# JkCERTSIndicator SSL_CLIENT_CERT
#
# #
###

#
# Root context mounts for Tomcat
#
JkMount /*.jsp ajp12
JkMount /servlet/* ajp12
#
# Auto configuration for the /examples context starts.
#
#
# The following line makes apache aware of the location of the /examples 
context
#
Alias /examples "D:/Tomcat/webapps/examples"

   Options Indexes FollowSymLinks


#
# The following line mounts all JSP files and the /servlet/ uri to tomcat
#
JkMount /examples/servlet/* ajp12
JkMount /examples/*.jsp ajp12
#
# The following line prohibits users from directly accessing WEB-INF
#

   AllowOverride None
   deny from all

#
# Use Directory too. On Windows, Location doesn't work unless case matches
#

   AllowOverride None
   deny from all

#
# The following line prohibits users from directly accessing META-INF
#

   AllowOverride None
   deny from all

#
# Use Directory too. On Windows, Location doesn't work unless case matches
#

   AllowOv

Re: Newbie here...Need help with Tomcat

2003-04-02 Thread John Turner
You can run .class files, but they have to be servlets.  I'm not appdev 
enough (I'm a sys-admin) to get the terminology correct, so take this with 
a grain of salt, but I think all classes called directly on the command 
line need to implement HttpServlet.

Then you need to map your servlet in your applications web.xml file, or use 
the servlet Invoker (not recommended) like the /examples servlets do.

Check out the /examples web.xml file to see how it does it if you want to 
go that way.

If you post back with the URL you are trying to use, the location of your 
.class/servlet on your system (like /myApp/WEB-INF/classes/myClass.class or 
whatever), folks here can tell you exactly what you need to do.

John

On Wed, 02 Apr 2003 13:08:10 -0700, Bryan Richardson 
<[EMAIL PROTECTED]> wrote:

When I run the examples in the "examples" foler, it looks like they all 
call a .jsp file, then maybe a .class file.  The person that wrote the 
program I am trying to run is going straight to a .class file by defining 
a servlet-class in web.xml.  Would this have anything to do with it?

I have included the mod_jk.conf-auto file in my Apache httpd.conf file.  
The mod_jk.conf-auto file is attached to this e-mail.  I set up a context 
definition in server.xml like the following:



Would I happen to need a worker or something?  I'm still not sure what a 
worker is...

Bryan

Original Message Follows
From: John Turner <[EMAIL PROTECTED]>
Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
To: Tomcat Users List <[EMAIL PROTECTED]>
Subject: Re: Newbie here...Need help with Tomcat
Date: Wed, 02 Apr 2003 08:29:08 -0500
On Wed, 02 Apr 2003 01:59:48 -0700, Bryan Richardson 
<[EMAIL PROTECTED]> wrote:
If I run a version of Tomcat as a standalone web server, can I access a 
database with it or will I need to set it up with Apache to access a 
database?
Tomcat facilitates database connections just fine.  Apache is not needed 
for this.

I have been trying to attach Tomcat with Apache.  I used mod_jk, and I 
could run the java example programs in the "examples" folder, but it 
would not run java programs under my own folder in "webapps".  I believe 
I have the folder,web.xml,etc. set up right because it will run the java 
programs in my folder if I go directly to Tomcat via port 8080 rather 
than trying to run them through Apache.  Has anyone had this same 
problem or know something that I should be doing?
We'd have to know more to help.  Many people are doing this.  Relevant 
portions of httpd.conf (not the whole thing), the Context definitions in 
server.xml, etc.

Someone please help if you can.  Thanks.  Bryan

John

--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


_
Add photos to your messages with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail



--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Newbie here...Need help with Tomcat

2003-04-02 Thread John Turner
Ooopsthe sys-admin in me is exerting its influence.  "directly on the 
command line" = "in a URL". :)

John

On Wed, 02 Apr 2003 15:27:28 -0500, John Turner  wrote:

You can run .class files, but they have to be servlets.  I'm not appdev 
enough (I'm a sys-admin) to get the terminology correct, so take this 
with a grain of salt, but I think all classes called directly on the 
command line need to implement HttpServlet.

Then you need to map your servlet in your applications web.xml file, or 
use the servlet Invoker (not recommended) like the /examples servlets do.

Check out the /examples web.xml file to see how it does it if you want to 
go that way.

If you post back with the URL you are trying to use, the location of your 
.class/servlet on your system (like /myApp/WEB-INF/classes/myClass.class 
or whatever), folks here can tell you exactly what you need to do.

John

On Wed, 02 Apr 2003 13:08:10 -0700, Bryan Richardson 
<[EMAIL PROTECTED]> wrote:

When I run the examples in the "examples" foler, it looks like they all 
call a .jsp file, then maybe a .class file.  The person that wrote the 
program I am trying to run is going straight to a .class file by 
defining a servlet-class in web.xml.  Would this have anything to do 
with it?

I have included the mod_jk.conf-auto file in my Apache httpd.conf file.  
The mod_jk.conf-auto file is attached to this e-mail.  I set up a 
context definition in server.xml like the following:



Would I happen to need a worker or something?  I'm still not sure what a 
worker is...

Bryan

Original Message Follows
From: John Turner <[EMAIL PROTECTED]>
Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
To: Tomcat Users List <[EMAIL PROTECTED]>
Subject: Re: Newbie here...Need help with Tomcat
Date: Wed, 02 Apr 2003 08:29:08 -0500
On Wed, 02 Apr 2003 01:59:48 -0700, Bryan Richardson 
<[EMAIL PROTECTED]> wrote:
If I run a version of Tomcat as a standalone web server, can I access a 
database with it or will I need to set it up with Apache to access a 
database?
Tomcat facilitates database connections just fine.  Apache is not needed 
for this.

I have been trying to attach Tomcat with Apache.  I used mod_jk, and I 
could run the java example programs in the "examples" folder, but it 
would not run java programs under my own folder in "webapps".  I 
believe I have the folder,web.xml,etc. set up right because it will run 
the java programs in my folder if I go directly to Tomcat via port 8080 
rather than trying to run them through Apache.  Has anyone had this 
same problem or know something that I should be doing?
We'd have to know more to help.  Many people are doing this.  Relevant 
portions of httpd.conf (not the whole thing), the Context definitions in 
server.xml, etc.

Someone please help if you can.  Thanks.  Bryan

John

--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


_
Add photos to your messages with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail






--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]