Changing the server context path

In some circumstances you may want to change the server context path for accessing JReport Server console and running JReport reports. This section introduces how to do this in a standalone or an integrated environment.

Changing standalone server context path

JReport has the following URL configuration for accessing JReport Server console and running JReport reports in a standalone environment:

http://<hostname>:8888/jrserver
http://<hostname>:8888/jinfonet/index.jsp
http://<hostname>:8888/dhtmljsp/...

You may want to change the server context path as follows:

http://<hostname>:8888/jrp/jrserver
http://<hostname>:8888/jrp/jinfonet/index.jsp
http://<hostname>:8888/jrp/dhtmljsp/...

To do this:

  1. Copy all contents in <install_root>\public_html to <install_root>\public_html\jrp.
  2. Modify the following property values in server.properties in <install>\bin directory by adding "/jrp":

    web.design_servlet_path=/jrp/webreporting
    web.dhtml_jsp_path=/jrp/dhtmljsp
    web.dhtml_servlet_entry_path=/jrp/jrdhtml
    web.dhtml_servlet_path=/jrp/dhtml
    web.help_servlet_path=/jrp/help
    web.jreport_servlet_path=/jrp/jrserver
    web.skin.dir=/jrp/skin

  3. Modify the value of jsp_path in redirect.properties in <install>\bin directory by adding "/jrp":

    jsp_path=/jrp/jinfonet/

  4. Modify mapping.properties in <install>\bin directory by adding "/jrp":

    # Map servlets to paths
    # Properties beginning with a . are extension properties, all other
    # properties are path properties
    #
    # Format:
    # path or extension = servlet name
    

    /jrp/jrserver=jrserver /servlet/sendfile=sendfile /jrp/dhtml=dhtml /jrp/jrdhtml=jrdhtml /jrp/help=help .jsp=jspservlet

  5. Start the server and access the server by the URLs:

    http://localhost:8888/jrp/jrserver
    http://localhost:8888/jrp/jinfonet/index.jsp

    Run a report in Page Report Studio by the URL:

    http://localhost:8888/jrp/dhtmljsp/dhtml.jsp?jrs.catalog=%2fSampleReports%2fSampleReports.cat&jrs.report=%2fSampleReports%2fEmployeeInformation.cls

Changing integrated server context path

Supposing that all server resources are deployed to the context root folder jreport\ after deploying JReport Server to an application server.

You can use the following URLs for accessing JReport Server service console and running JReport reports in the integrated environment:

http://<hostname>:port/jreport/jinfonet/index.jsp
http://<hostname>:port/jreport/dhtmljsp/...

You may want to change the server context path as follows:

http://<hostname>:port/jreport/myjsp/jinfonet/index.jsp
http://<hostname>:port/jreport/myjsp/dhtmljsp/...

To do this:

  1. Move index.htm and the following folders from jreport\ to jreport\myjsp\:

    admin
    dhtmljsp
    images
    javascript
    jinfonet
    skin
    style

  2. Create a file jrserver.properties in the \WEB-INF directory, add the skin and dhtmljsp properties and provide the correct paths (the context root is excluded):

    web.skin.dir=/myjsp/skin
    web.dhtml_jsp_path=/myjsp/dhtmljsp

  3. Access the server by the URL: http://<hostname>:port/jreport/myjsp/jinfonet/index.jsp

    Run a report in Page Report Studio> by the URL:

    http://<hostname>:port/jreport/myjsp/dhtmljsp/dhtml.jsp?jrs.catalog=%2fSampleReports%2fSampleReports.cat&jrs.report=%2fSampleReports%2fEmployeeInformation.cls