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
No comments:
Post a Comment