Reaching out to others! Free & Open Source Software, Kannada, L10n, L18n Data Science, Cloud Computing & more…

Apache/Tomcat and JkMount with Servlets

What if I like to access the servlets directly via port 80 instead of using :portnumber on my URL?

You can do a trick, Edit apache virtualhost entry and add the JkMount directive.

For example: I wanted to access a servlet which was under seed directory of my document root. I was able to access the servlet at https://domainname.com:8080/seed/servlet/

All I wanted to do is to simplify the above URL to look like :

https://domainname.com/seed/servlet/

This is not possible as appBase and DocBase are set to my domains Document root.

Hence I had make use of JkMount directive in VirtulHost entry as follows to change the appBase for the servler URI as follows :


JkMount /*.do ajp13
JkMount /*.jsp ajp13
JkMount /seed/servlet/* ajp13
JkMount /seed/servlets/* ajp13
JkMount /manager/* ajp13

Now my URL works as needed.