Ooops....the 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 <tomcat- [EMAIL PROTECTED]> 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:

<Context path="/pnm"
docBase="webapps/pnm"
crossContext="true"
debug="0"
reloadable="true"
trusted="false" >
</Context>

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]



Reply via email to