How to install JAVA application in DocumentRoot directory?

Created:

2016-12-12 03:41:40 UTC

Modified:

2017-08-08 13:10:12 UTC

2

Was this article helpful?


Have more questions?

Submit a request

How to install JAVA application in DocumentRoot directory?

Applicable to:

  • Plesk Onyx for Linux
  • Plesk 12.5 for Windows

Question

How to install JAVA application in DocumentRoot directory to make it available by direct link http://example.com instead of http://example.com/java_app ?

Answer

There is no such functionality in Plesk at the moment. The feature request regarding this has been requested on User Voice Deploy Tomcat application as ROOT contexto .

As a workaround, for Windows this is possible to make JAVA application available by http://example.com URL, using IIS rewrite rules.

Add the following directives to website's web.config file in %plesk_vhosts%\example.com\httpdocs directory:

     <rewrite>
<rules>
<rule name="java app rewrite rule" enabled="true">
<match url="^" />
<conditions>
</conditions>
<action type="Rewrite" url="http://example.com/java_app" />
</rule>
</rules>
</rewrite>

Check KB #213943325 article to find how to set up .JSP pages to run from domain's DocumentRoot directory on Linux.

Have more questions? Submit a request
Please sign in to leave a comment.