Wikipedia defines Tomcat as a servlet container developed by the Apache Software Foundation which implements the Java Servlet and the JavaServer Pages (JSP) specifications from Sun Microsystems, and provides a “pure Java” HTTP web server environment for Java code to run. What does this all mean, and why is it important?
Well for starters, the built in web server on Windows Home Server is not capable of serving up JSP. This means you have to use a different server to do this. Why would you want to? Well, VMWare Server for one uses this method, and HP uses it with the EX485 and EX487 machines and a different server to do the same on the EX470 and EX475 for the webshares and photo gallery stuff. But the main goal of this tutorial is going to be getting SubSonic Media Streamer installed. But we will get to that much later.
Originally, I wanted to get Subsonic installed, because it is a nice package (check it out, it’s worth at least looking). There is a Windows installer, or you could just install Tomcat. Both require you opening up another port. Which is something that I don’t like doing if I can avoid it. Looking into solutions to my problem, I ran across “Jakarta”. For those with MediaSmart Servers, you may recognize this. I know I did. Jakarta is a connection software that allows “IIS” (the built in web server for WHS) to redirect to Tomcat and serve up those JSP pages.
What does this mean to most people? It means using “https://myserver.homeserver.com/subsonic/” instead of “http://myserver.homeserver.com:8080/” and some more control about what’s available over the internet.
However, this tutorial is only for people who don’t have MediaSmart Servers, because the EX48x series already has Tomcat installed, and the EX47x series has some special considerations for installing, that I will not cover here but will definitely cover later.
What you will need:
- Java – Get the most updated one. I recommend the Offline as it won’t have to go and download stuff also.
- Apache Tomcat – Grab the “Windows Service Installer” from the bottom part of the page
- Jakarta binary for Win32 – it should be named “isapi_redirect-1.2.28-chunking.dll”, and if this causes issues, grab the one without the “chunking” in the name.
What to do
First, download all three of these files to a place you access them. Preferably the Home Server desktop, or copy them to it. Once you do that, run the Java installer. It’s default location should be absolutely fine, but just keep a note of where you install it to. (Should be “C:\Program Files\Java\jre6″ by default).
Once Java is installed, start the Tomcat installer. Agree (and read) the license agreement, and then proceed to the options. You’ll want to enable the “Service” and “Examples” options, and if you want, the “Native” option also. After that, you should be able to just use all the defaults and it should pick up the location that Java is installed.
You’ll probably have to start the Tomcat service now. Either just reboot the server, or open up Services console (located in Administrative Tools, or by running “services.msc”). It should be near the top and named “Apache Tomcat 6″, or similar. Start the service, and leave this console open, you’ll need it later.
After it’s started, try opening “http://localhost:8080/examples/servlets/servlet/HelloWorldExample” on your server, if you installed the examples that greets you with “Hello World”.
After that’s done and you’ve verified that it’s working, we need to configure it and IIS to work with each other. in the Tomcat directory (should be “C:\Program Files\Apache Software Foundation\Tomcat 6.0\” by default), and create a folder called “ISAPI”. Copy the Jakarta dll file (isapi_redirect….) to this folder and rename it to just “isapi_redirect.dll”. Right click it and select properties. If the “unblock” button is there, click it and then click Okay. If it isn’t, don’t worry. Now, right click on the ISAPI folder and select properties. Open the Security tab and add “NETWORK SERVICE” to the list of users.
Now create a text file in that same directory named “isapi_redirect.properties”. Open this file up in notepad and add the following to the contents of the file:
extension_uri=/jakarta/isapi_redirect.dll log_file=C:\Program Files\Apache Software Foundation\Tomcat 6.0\logs\isapi_redirect.log log_level=info worker_file=C:\Program Files\Apache Software Foundation\Tomcat 6.0\conf\workers.properties worker_mount_file=C:\Program Files\Apache Software Foundation\Tomcat 6.0\conf\uriworkermap.properties
Save the file and close it. Now go to “C:\Program Files\Apache Software Foundation\Tomcat 6.0\conf\” and create “workers.properties”. Set the file to the following:
worker.list=wlb,jkstatus worker.ajp13w.type=ajp13 worker.ajp13w.host=localhost worker.ajp13w.port=8009 worker.wlb.type=lb worker.wlb.balance_workers=ajp13w worker.jkstatus.type=status
Save the file, close it and now create “uriworkermap.properties” in the same folder and set it to the following:
/examples/*=wlb
This last file configures what directories will be passed on from tomcat to IIS. Right now, this enables the “examples” directory to be passed on and accessible from the remote access website. If you need to add more, like subsonic, add “/subsonic/*=wlb”.
Once that is done, you’ll need to open up “Internet Informational Services (IIS) Manager. Navigate down to “Web Services Extensions” and right click on it, and select “Add a new web service extension…”. Name the Extension “Jakarta” and then click the “Add” button. If everything is in the default location, use “C:\Program Files\Apache Software Foundation\Tomcat 6.0\ISAPI\isapi_redirect.dll” for the path to the file. Click okay, and then check “Set extension status to Allowed” and then click Okay.
Open up “Web Sites” and right click on “Default Web Site” and select properties. Open up the “ISAPI Filter” tab. Click “Add”, set the filter name to “Jakarta” and the executable to “C:\Program Files\Apache Software Foundation\Tomcat 6.0\ISAPI\isapi_redirect.dll”. Click okay twice and then right click on “Default Web Site” select “New >” and “Virtual Directory”. Use the “alias” of “jakarta” and use “C:\Program Files\Apache Software Foundation\Tomcat 6.0\ISAPI” for the folder. Set the options for read, script and execute. Click Okay, and open up the Services console again and restart the “World Wide Web Publishing Service” .
Once that is done, open up “https://mydomain.homeserver.com/examples/servlets/servlet/HelloWorldExample” on any computer and you should be greeted with a familiar “Hello World” page.
Now you have a fully working Java server installed, configured and serving pages to the outside world.
Next, I’ll be going over how to install and configure Apache Tomcat on your HP MediaSmart Server Ex470/EX475.





![Western Digital 1 TB Caviar Green SATA Intellipower 32 MB Cache Bulk/OEM Desktop Hard Drive WD10EADS [Amazon Frustration-Free Packaging] Image of Western Digital 1 TB Caviar Green SATA Intellipower 32 MB Cache Bulk/OEM Desktop Hard Drive WD10EADS [Amazon Frustration-Free Packaging]](http://ecx.images-amazon.com/images/I/41wy7N-QdJL._SL160_.jpg)

9. October 2009 at 4:12 am
I think it would be great if you write one that would say how to make the VMware server website available at something like “https://mydomain.homeserver.com/vmwareserver"... instead of using the ports.
9. October 2009 at 4:12 am
I think it would be great if you write one that would say how to make the VMware server website available at something like “https://mydomain.homeserver.com/vmwareserver&... instead of using the ports. But a great post none the less!
9. October 2009 at 4:12 am
I think it would be great if you write one that would say how to make the VMware server website available at something like "https://mydomain.homeserver.com/vmwareserver" instead of using the ports. But a great post none the less!
9. October 2009 at 7:21 am
I tried. It's hard coded somewhere in the VMWare webapp. Nothing I can do about it without a reverse proxy (I believe), like the full version of helicon's ISAPI_REWRITE3. However, you can dump the ui directory into this installation of tomcat, disable the VMWare web service, and access it normally.
9. October 2009 at 9:40 am
works great cheers for the writeup and also for the subsonic idea.. I know have subsonic happily streaming via my homeserver url.
9. October 2009 at 10:35 am
Taff, I'll be doing a write-up for installing and configuring Tomcat on the EX470 series, and then running though how configure subsonic for those platforms.
10. October 2009 at 6:54 pm
I was able to successfully install and configure Tomcat/Jakarta by following the tutorial. Thanks for that!
However, I'm not sure what I need to do to access Subsonic after installing it to the default location. It installs to "C:Program FilesSubsonic" and also creates a "C:subsonic" directory.
How should the entry in the uriworkermap.properties file for subsonic be formatted? Do you have to do any additional configuration after the default install of subsonic? Finally, what would the homeserver.com url be for accessing subsonic?
Sincerely,
IIS/Apache Newb.
10. October 2009 at 6:54 pm
I was able to successfully install and configure Tomcat/Jakarta by following the tutorial. Thanks for that!
However, I'm not sure what I need to do to access Subsonic after installing it to the default location. It installs to "C:Program FilesSubsonic" and also creates a "C:subsonic" directory.
How should the entry in the uriworkermap.properties file for subsonic be formatted? Do you have to do any additional configuration after the default install of subsonic? Finally, what would the homeserver.com url be for accessing subsonic?
Sincerely,
IIS/Apache Newb.
12. October 2009 at 6:45 pm
Very good article.
Can I use Tomcat to run a website with ajax / java.
17. October 2009 at 9:36 pm
Levi, uninstall the subsonic program. You want the "WAR" file. There should be instructions on the site on how to install it. But basically, download the WAR file, and dump it in "C:\\program files\\apache software foundation\\tomcat 6.0\\webapps\\" and restart the tomcat service.
Then add "/subsonic*=wlb" to urlworkermap.properties. Then the url should be xxx.homeserver.com/subsonic/
1. November 2009 at 2:30 am
Were you able to leverage SSL (either through Tomcat, importing the existing TLS certificate or by leveraging IIS) for your JSP pages?