Search Type:
Search for:

Language:

Product:
Category:
No categories for selected product

[Info] How do I setup .JSP pages to run from domains' DocumentRoot directory.

Article ID: 1575 
Last Review: Apr,20 2009
Author: Dmitry Frantsev
Last updated by: system APPLIES TO:
  • Parallels Plesk Panel for Linux/Unix

Resolution

The instructions below are for system administrator who has SSH root access to Parallels Plesk Panel server. If you do not have access to the server you should request for the reconfiguration.

Since the 8th version Plesk uses mod_jk Tomcat connector.

To be able to run .JSP pages directly from httpdocs/httpsdocs
directories you have to do some additional configuration. For example you
want to place your .JSP pages in the 'jsp' directory. You should create the 'jsp'
directory under httpdocs then create the vhost.conf file with the following
content:

# cat HTTPD_VHOSTS_D/DOMAIN_NAME/conf/vhost.conf
<IfModule mod_jk.c>
JkMount /jsp ajp13
JkMount /jsp/* ajp13
</IfModule>


then run websrvmng utility: "PRODUCT_ROOT_D/admin/sbin/websrvmng -v -a".

Then you should modify server.xml and create additional 'Context' inside appropriate <Host> tag. Host in Tomcat is the same as VirtaulHost in Apache configuration.

<!-- Here is part of the server.xml Host tag for "DOMAIN_NAME" domain: -->
<Host deployXML="true" name="DOMAIN_NAME" debug="0" appBase="psa-webapps/DOMAIN_NAME" unpackWARs="false"
autoDeploy="true" liveDeploy="true">

<!-- This is Context that is generated by Plesk: -->
<Context crossContext="false" reloadable="false" useNaming="true" debug="0" swallowOutput="false" privileged="true" displayName="Tomcat Manager Application" docBase="/var/tomcat4/server/webapps/manager" cookies="true" path="/manager" cachingAllowed="true"/>


<!-- This is Context that you should add to server.xml after the default Plesk Context: -->
<Context crossContext="false"
reloadable="false" useNaming="true" debug="0" swallowOutput="false"
privileged="true" displayName="Your Application Name"
docBase="/var/www/vhosts/DOMAIN_NAME/httpdocs/jsp" cookies="true"
path="/jsp" cachingAllowed="true"/>

<Realm
className="org.apache.catalina.realm.MemoryRealm" debug="0" pathname="psa-users/DOMAIN_NAME.xml" validate="true"/>
</Host>

Restart tomcat after server.xml modification.

Please note that you should replace DOMAIN_NAME with a real domain name.

Next, the user Tomcat is run under (usually it is tomcat) should be added into psaserv group in order to allow Tomcat to have access to a domain's httpdocs directory.

After that you can access your application by url like this: http://DOMAIN_NAME/jsp



Subscription for changes to this article Subscription for changes to this article

Please provide feedback on this article

Did this article help you solve your issue?
Yes
No
Partially
I do not know yet
 
Strongly Agree   Strongly Disagree
  9 8 7 6 5 4 3 2 1
The article is easy to understand
The article is accurate
Additional Comments:
*Please provide us with your email address in case we need to contact you.
* - required fields
 
 
 
 
 
 
For Home
For Business
For Hosters
For SaaS
For Developers
 
Desktop Virtualization
- Parallels Desktop Switch to Mac Edition
- Parallels Desktop for Mac
- Parallels Desktop 4 for Windows & Linux
- Parallels Workstation Extreme
- Parallels Solution for Windows 7
Server Virtualization
- Parallels Server for Mac
- Parallels Server 4 Bare Metal
- Parallels Virtuozzo Containers
Automation
- Parallels Operations Automation
- Parallels Business Automation
- Parallels Virtual Automation
- Parallels Plesk Panel Suite
More Products