VDS Sphera Knowledge Base

Main / Browse Categories / Tomcat Server / How can I create my own directory for my java servlet pages?

Print article Print Article    Email article Email Article

How can I create my own directory for my java servlet pages?
Let's say you want to create a directory named "myapps" and serve java servlet pages from this directory. Here is an example of how to do this.

Example "/etc/httpd/conf/mod_jk.conf" file:

Alias /myapps "/var/tomcat4/webapps/myapps"
<Directory "/var/tomcat4/webapps/myapps">
Options Indexes FollowSymLinks
DirectoryIndex index.jsp
</Directory>
<IfModule mod_jk.c>
    JkWorkersFile conf/workers.properties
#    JkLogFile logs/mod_jk.log
#    JkLogLevel info

    JkMount /*.jsp ajp13
    JkMount /hw/* ajp13
    JkMount /myapps/*.jsp ajp13

#    JkMount /examples/* worker1
#    JkMount /*/servlet/ worker1
#    JkMount /webdav/* worker1
#    JkMount /tomcat-docs/* worker1
#    JkMount /admin/* worker1
#    JkMount /manager/* worker1

#    JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
#    JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
#    JkRequestLogFormat "%w %V %T"
#    JkOptions +ForwardURICompat
</IfModule>

User Comments
How can I create my own directory for my java servlet pages?  
There are no user comments for this topic.
 

Attachments
No attachments.

Related Articles
 How come my catalina.out file is zero length?
 Where do I put my JSP and servlet files?
 Where is my mod_jk.conf file?
 Where are my Tomcat logs located?
 What version of Tomcat will I have?

Why Choose Our Hosting?

  • Unmatched Customer Support!
  • Virtual Private Server technology provides a rich, dedicated-like environment for every account.
  • We are known for our superb quality, performance and flexible hosting environment. We manage the server, software, and network you do the rest.
Continue reading »

Featured Hosting Plan


Learn more about our VPS Extreme

What is Included?

  • PHP 5/MySQL 5
  • Parallels® Plesk Panel 10
  • Unique IP Address
  • Daily VPS Backups (Off Server)
  • SAS Hardware Raid diskspace
  • CentOS 5 x86_64 bit
  • Multi-homed Tier 1 Bandwidth
  • Full Upgrade capabilities
Continue reading »