How to install JAVA application in DocumentRoot directory?

There is no such functionality in Plesk at the moment to install java application in root directory.

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 \example.com\httpdocs directory:



<configuration>
<system.webServer>
<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>
</system.webServer>
</configuration>



If you have an existing 
web.config file:

  • Ensure you have sections (i.e. opening and closing tags) for:
    • system.webServer (which contains rewrite)
    • rewrite (which contains rules)
    • rules (which contains one or more rule sections)
  • Insert any of those sections that do not exist.
  • Insert the entire rule section, including matchconditions, and action, inside the rules section.
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

500 internal server error - How to Get detailed errors

By default, our Windows hosting accounts display a custom/generic error when applications...

Disabling Browser Cache on Windows Server static files

The following configuration sample adds an HTTP "Cache-Control: no-cache" header to the response,...

Enabling Cache on Your Windows Hosting Account using clientCache

With our Windows hosting accounts, you can create caching rules to enhance your website's speed...

How to set Session Timeout in web.config

There are two way to set session timeout property in ASP.Net.First Method : Edit the following in...

Scheduled Tasks (cron job)

Scheduling Tasks (Windows) If you need to run scripts on your hosting account at specific time,...