Tuesday, 29 September 2015

Deploy NextReports Server on WebLogic 12c

First, you should create a nextreports-server.war folder and unarchive the war file here.

Inside nextreports-server.war/WEB-INFyou should add weblogic.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<wls:weblogic-web-app
xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-web-app"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd
http://xmlns.oracle.com/weblogic/weblogic-web-app
http://xmlns.oracle.com/weblogic/weblogic-web-app/1.1/weblogic-web-app.xsd">

<wls:weblogic-version>12c</wls:weblogic-version>

<wls:jsp-descriptor>
<wls:debug>true</wls:debug>
</wls:jsp-descriptor>

<wls:container-descriptor>
<wls:prefer-application-packages>
<wls:package-name>org.joda.time.*</wls:package-name>
</wls:prefer-application-packages>
</wls:container-descriptor>

</wls:weblogic-web-app>
Here we specified we want another joda library than that used by weblogic.

Next, we have to register reports folder as a web context. We create a reports.war folder as a sibling to nextreports-server.war, and inside it we have a WEB-INF folder with two files:  
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app
xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
</web-app>
and weblogic.xml where we specified local path to our reports folder:
<!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application 8.1//EN" "http://www.bea.com/servers/wls810/dtd/weblogic-web-jar.dtd">

<weblogic-web-app>

<container-descriptor>
<index-directory-enabled>true</index-directory-enabled>
</container-descriptor>

<virtual-directory-mapping>
<local-path>/appsvr/reports</local-path>
<url-pattern>*</url-pattern>
</virtual-directory-mapping>

<context-root>/reports</context-root>

</weblogic-web-app>
After your server starts, you should accordingly modify your server settings like base url, reports url , mail server and so on.

References:
Publish static context to WebLogic

2 comments:


  1. Excellent post on Java!!!Everyone are repeating the same concept in their blog, but here I get a chance to know new things in Java programming language. I will also suggest your content to my friends to know about recent features of Java.

    Regards:

    Best Java Training in Chennai |
    J2EE Training in Chennai

    ReplyDelete
  2. Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a Java developer learn from Java Training in Chennai. or learn thru Java Online Training India . Nowadays Java has tons of job opportunities on various vertical industry.

    ReplyDelete