Jump to content
We've recently updated our Privacy Statement, available here ×
  • How to hide the /jasperserver-pro in the URL


    gregd

    Issue:

    The following is a Tomcat solution for running Jasper Server using a short URL. For example, using http://localhost:8080 instead of http://localhost:8080/jasperserver-pro.


    Resolution:

    How do I override the default home page loaded by Tomcat?

    After successfully installing Tomcat, you usually test it by loading http://localhost:8080 . The contents of that page are compiled into the index_jsp servlet. The page even warns against modifying the index.jsp files for this reason. Luckily, it is quite easy to override that page. Inside $TOMCAT_HOME/conf/web.xml there is a section called <welcome-file-list> and it looks like this:

       <welcome-file-list>
           <welcome-file>index.html</welcome-file>
           <welcome-file>index.htm</welcome-file>
           <welcome-file>index.jsp</welcome-file>
       </welcome-file-list>
    

    The default servlet attempts to load the index.* files in the order listed. You may easily override the index.jsp file by creating an index.html file at $TOMCAT_HOME/webapps/ROOT. It's somewhat common for that file to contain a new static home page or a redirect to a servlet's main page. A redirect would add a <meta> tag into the <head> of the HTML page that looks like this:

    <meta http-equiv="refresh" content="0;URL=http://mydomain.com/some/path/to/servlet/homepage/">

    This change takes effect immediately and does not require a restart of Tomcat.


    Reference:


    Ref. Case #00026598

    --Jimw at jaspersoft 06:37, 24 July 2012 (UTC)


    User Feedback

    Recommended Comments

    There are no comments to display.



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...