Web Hosting Talk







View Full Version : Tomcat 4.0


mpkapadia
10-02-2001, 04:18 PM
Hi,

Anyone tried this as yet, I tried it on a Windows box, cannot believe that tomcat can be so easy to setup ,
Just ran the setup file,
Put the env variables java_home and catlina_home , and started tomcat , and boom it works in standalone mode,

Now my problem, I want to integrate it with IIs
and cant find any dll file which i can put in isapi on the web server,

Anyone here tried iis + tomcat setup,

I know resin is better and managed to get virtual hosts working with it,
but i just want to fool around with this , i have heard that since tomcat 4.0 was rewritten from scratch , uses new servlet engine catline it is going to be very good,

Share your experiences,

With regards

Manish Kapadia

Epicurus
10-02-2001, 10:17 PM
You need to download the isapi connector dll as a separate download from the jakarta.apache.org site. It is available from the download page. Then you should be able to followed the supplied documentation.

mpkapadia
10-03-2001, 01:09 AM
I saw it
http://jakarta.apache.org/site/binindex.html

There is no isapi connector on the tomcat 4.0 over there,
It is there only on 3.2.3 , but i wonder if that will work:confused:

Regards
Manish Kapadia

Epicurus
10-03-2001, 02:01 AM
I don't know for sure, but I think it will because the actual protocol between tomcat and IIS is the same regardless of tomcat version (it's the whole "apj13" connector protocol). Good luck.

mpkapadia
10-07-2001, 06:18 AM
I dont know it it would work because the documentation states

Add a string value with the name worker_file and a value which is the full path to your workers.properties file (for example c:\jakarta-tomcat\conf\workers.properties)
Add a string value with the name worker_mount_file and a value which is the full path to your uriworkermap.properties file (for example c:\jakarta-tomcat\conf\uriworkermap.properties)

And now these 2 files i could not actually find on a tomcat 4 setup:confused:

So i tried the same with tomcat 3.2.3 , Started in standalone worked, COnfigured the Isapi connector, works on port 80

Now only thing i dont get is how to get it running on virtual sites,

I added the virtual host stuff in server.xml and started tomcat again but it is not working,

Any ideas,

With regards

Manish Kapadia

RackMy.com
10-07-2001, 08:52 AM
I think you have to use Tomcat 4.0 in order to run virual sites. It's been a while, but here is what I remember:

1. You need the java SDK and Tomcat installed, which I am sure you have already done. :)
2. You need to add the java and Tomcat paths to your environmental variables: Right-Click on My Computer -> Properties, go to Evironmental Variables* and set:

TOMCAT_HOME = C:\Tomcat
JAVA_HOME = C:\JDK1.3
3. Download the isapi_redirect.dll from Tomcat's site and copy to "C:\Tomcat\bin" or the /bin directory of your Tomcat files.
4. You have to add the following to your registry (W2K)[HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation]
[HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Apache Web Server]
[HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Apache Web Server\1.3.14]
[HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi Redirector]
[HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi Redirector\1.0]
"extension_uri"="/jakarta/isapi_redirect.dll"
"log_file"="C:\\TomCat\\logs\\isapi.log"
"log_level"="error"
"worker_file"="C:\\TomCat\\conf\\workers.properties"
"worker_mount_file"="C:\\TomCat\\conf\\uriworkermap.properties"
5. Open IIS management console and create a new virtual directory called "jakarta" and make the physical path "C:\Tomcat\bin" Make sure that this virtual directory has "Execute" permissions.
6. In the IIS Management Console right-click on your machine name (not the root web) and select properties. Click the Edit button next to the "Master Properties" for the WWW Service. Select the "ISAPI Filters" tab and click "Add" Name the filter "jakarta" and for the executable, browse to C:\Tomcat\bin\isapi_redirect.dll file.
7. Now go to the control panel, select Services and restart the IIS Admin service (make sure Word Wide Web Publishing Service restarts as well). After you have restarted, go back to the ISAPI filters screen and make sure that the jakarta filter has a green arrow next to it. If it does, then everything is working.
8. Make sure that Tomcat is running. Open your browser to http://localhost/examples/ - you should see that Tomcat is serving this directory. There are several JSP examples which you can click on to test.
9. Now to have it run in virtual sites, open C:\Tomcat\conf\Server.xml in notepad and find the line towards the bottom that looks like this:

<Context path="" docBase="webapps/ROOT" debug="0" reloadable= "true"/>
and change it to this:
<Context path="/" docBase="C:/InetPub/wwwroot" debug="0" reloadable="true"/>
(if that line doesn't already exist, then just add it)

10. Open C:\Tomcat\conf\uriworkermap.properties with notepad. Add the following line anywhere in the file:

/*.jsp=ajp12

If you like, you can comment out the other lines that redirect the examples and servlet directories, although it doesn't hurt anything to leave them there.

11. Make sure that it is working by browsing to http://localhost/ to see that your normal default page is still showing up as expected. Now place a file called test.jsp (or whatever) in C:\InetPub\wwwroot and browse to http://localhost/test.jsp If you put some JSP code in there, it should execute. If you didn't, then the blank page should load. If you are prompted to download instead, then something is not working.

Here is a couple of resources to help:

http://www.verysimple.com/scripts/support_tc_iis.html
http://www.jguru.com/faq/topicindex.jsp?topic=Tomcat
http://www.perl.jann.com/tomcat/200103/msg00612.html

Tomcat is a pain to work with in Windows (at least in my experience, but I guess what do you expect when it's free :)

Hope that helps you out!

mpkapadia
10-07-2001, 10:47 AM
Hello Mike,

That is what i am telling here

The file
workers.properties
uriworkermap.properties

Is not there on Tomcat 4.

Instead of environment variables tomcat_home what is reqd on tc4 is

catalina_home

The documentation you have given is correct for tomcat 3.2.3 which i managed to run

I just have to see steps 9 and 10 below for virtual hosts which i will check it out now ,
I will keep you posted anyway,

thanks and regards

Manish Kapadia

RackMy.com
10-07-2001, 12:05 PM
My bad! I was looking at my 3.2.X notes. We stopped supporting it under W2K because it's hard to configure and explain how to configure.

I just downloaded TC 4.0, but have not seen anything about intergration with IIS. I will keep looking and let you know what I find.

Sorry again!

mpkapadia
10-14-2001, 04:28 PM
hello Mike,

as i tried i am able to do everything uptil the level that if i give localhost/examples/jsp file names then they work without giving port 8080 through IIS

but i dont know that if i have name based sites in iis for eg site1.com and site2.com how i can run jsp for those files , what configuration i have to make for them

anything to define in server.xml like how it is done in linux virtual hosts are defined in server.xml

Actually i tried that too but did not work
Any ideas

Regards

Lord MJ
10-15-2001, 03:21 PM
Don't try to connect Tomcat and IIS together, unless you enjoy pain.....


If you need to hook java up to something, you should try another webserver (like apache) or another servlet engine(like Resin).

If you must connect IIS and tomcat together, it will probably involve manually editing the windows registry. However jakarta may have released a few tools to allow for easy integration of the 2 servers.