The WebSphere configuration Jndi connection of data connection in sail soft report Finereport

Source: Internet
Author: User

The template jndi.cpt, made from the oracle9i data source, is an example of how WebSphere configuration Jndi connections are configured in Finereport. Because the Jndi driver of the common server is too large, the sail soft report Finereport is not brought in, so you can take the following method to use the Jndi connection in the server. Principle: First connect to the database with JDBC, establish a database connection, then use SQL or other methods to create the dataset, use the dataset to make the report, then change the established database connection from the JDBC connection to the Jndi connection, and then configure the Jndi connection in the server. Then follow the instructions in the section below to deploy the server so that you can browse through a Web browser to a report that uses JNDI connections.

1. Making a report that uses JNDI connections

First use the JDBC method to connect to the database oracle9i, and then use the database tables in the Oracle9i database sale make templates Jndi.cpt save can be previewed, such as:

650) this.width=650; "src=" http://img.blog.csdn.net/20151231092600122 "style=" border:none; "/>

Then, go back to defining the database connection, create a new Jndi data connection oracle9i, name Jndi jdbc/oracle, delete the previous connection method JDBC Oracle9i data connection, OK save. Such as:

650) this.width=650; "src=" http://img.blog.csdn.net/20151231092619006 "style=" border:none; "/>

The template jndi.cpt cannot be previewed at this time because we have only defined the Jndi name, and we have not established a JNDI connection.

2. Jndi Connection Configuration in WebSphere

Next, how to configure the Jndi connection in the WebSphere server.

Log in to the WebSphere management platform, select the Environment >websphere variable >oracle_jdbc_driver_path Enter the directory where the driver is located in the location of the value such as: C:\WebReport\WEB-INF\lib\ Ojdbc14.jar (the exact location of the Oracle JDBC driver), such as:

650) this.width=650; "src=" http://img.blog.csdn.net/20151231092640178 "style=" border:none; "/>

Enter global security >jaas Configure >J2C Authentication data > New input alias, user ID and password, alias: Oracle (can be random), User ID (Oracle user name, ^ user name and password used to connect to Oracle database): System, Password: DBA, such as:

650) this.width=650; "src=" http://img.blog.csdn.net/20151231092656890 "style=" border:none; "/>

Select Resource >JDBC provider > New, Step One: Oracle, step two: Oracle JDBC driver, step three: Connect pool data sources, such as:

650) this.width=650; "src=" http://img.blog.csdn.net/20151231092719484 "style=" border:none; "/>

Click Next, change the classpath to ${oracle_jdbc_driver_path}, and then save the app,

650) this.width=650; "src=" http://img.blog.csdn.net/20151231092732016 "style=" border:none; "/>

Once you've saved the app, click the Oracle JDBC Driver app, and in the upper right corner you'll see the data source, click. We will configure the data source > new, Name--oracle,jndi name--jdbc/oracle, component management authentication alias--frserver2003node1/oracle9i (for the configuration in the previous step global security, choose according to your own name) , enter jdbc:oracle:thin:@192.168.100.111:1521:oracle9i in the URL (based on the location of the Oracle database), the other is the default value, save. Then select the data source, click Test Connection, and the final result indicates that the JNDI data source configuration was successful.

650) this.width=650; "src=" http://img.blog.csdn.net/20151231092751417 "style=" border:none; "/>

3. Web application Deployment in WebSphere

This step is key to connecting templates and Jndi data sources.

Next, we select Web. XML under the%fr_home%/webreport/web-inf folder (note: The produced report JNDI.CPT saved in%fr_home%/webreport/web-inf/reportlets/com/ DOC/JNDI.CPT), open Web. XML with a tool similar to Notepad to add a portion of the content.

1. <resource-ref>

2. <description>oracle DB connection</description>

3. <res-ref-name>jdbc/oracle</res-ref-name>

4. <res-type>javax.sql.DataSource</res-type>

5. <res-auth>Container</res-auth>

6. </resource-ref>

Then pack the Webreport folder Webreport.war. For specific deployment procedures, refer to the deployment of WebSphere servers in the Finereport documentation. One of the steps is different from the documentation, where you need to select the Jndi name in the mapping resource reference to the resource and select the authentication method using the default method, and the Jndi name is required. The Jndi name set above is: Jdbc/oracle, the authentication method is: frserver2003node1/oracle9i, specific

650) this.width=650; "src=" http://img.blog.csdn.net/20151231092811944 "style=" border:none; "/>

After the deployment is successful we open the browser and fill in the Url:span class= "Paths"->http://localhost:9080/webreport/reportserver?reportlet=/com/doc/jndi.cpt

If the displayed screen appears, the configuration is successful.

650) this.width=650; "src=" http://img.blog.csdn.net/20151231092830783 "style=" border:none; "/>


The WebSphere configuration Jndi connection of data connection in sail soft report Finereport

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.