Develop portal applications using JA-SIG UPORTAL

zhaozj2021-02-16  76

This article describes the advantages and use of UPORTAL, an open source Java, XML, XSL portal architecture. This article assumes that the reader does not have an experience of uportal, involving two versions to start and source version. Author's brrad Rippe introduces the Java database HypersonicsQL with the fast version, and how to migrate to large databases such as Microsoft SQL Server. Finally, the article details the permission verification mechanism of the frame embedded.

A set of Java developers of Java In Administration Special Interest Group (JA-SIG) built UPORTAL and welcomed all Java enthusiasts to join this project.

With the growth of the organization, we often find us to find new ways to tell employees in new changes, processes and policies. We hope that employees and administrative institutions can organize organic organizations under the company's goals, plans, and transactions. Further, we want to present the information as possible and not limited to a certain aspect. Use the Internet to display the information seems to be a good start, but can our audience filter out from the vast information of the Internet?

In the field of education, we are also facing the same challenge. How to make management, distribution, employees, students can understand the institutional policy? How to ensure that the student group receives clear and recent information to help them achieve their respective learning and occupational goals. In addition, we hope to establish a "community" of students, teachers, administrative, division and staff, and provide guarantees for students to achieve their goals. We also want to enhance the experience of users to share groups during information sharing. At the same time, we want to achieve seamless integration of new and old applications.

One solution is to provide a support tool to provide valuable information based on user profiles, interests, and majors. However, developing such tools is not simple, especially if you have to consume and resource.

A good way is to find existing portals, but if customized is very troublesome, maybe you can see the Uportal developed by Java In Administration Special Interest Group (JA-SIG), UPORTAL is open source, based on Java, XML, And XSL project. The current release includes web service channels, permissions, user group management, and more. Uportal allows you to add new features you need to your institution. It focuses on higher education institutions, and some commercial organizations also use it as a framework for constructing coordinates. This framework includes an inserted component that provides information of user interest. The user can select the Caring channel based on its role in the organization, and can also customize the style you like yourself.

Uportal is free, but the development group learns Java, XML, XSL, and portal frameworks need to be put. This article tries to reduce UPORTAL to reduce this input by helping you run Uportal. Moreover, this article also describes how to cultivate UPORTAL to product databases and her basic authentication methods.

Fast version

In order to run uportal, first you have to download a version of JA-SIG Website. You can choose the fast version and source code. Note that you need a Java version of JDK13 or more.

Quick Edition facies users who do not deploy a portal product environment. This version allows users to download a Java database (Hypersonicsql), servlet container (Apache Tomcat), constructor (APACHE ANT), UPORTAL source, and profile. The fast version allows you to run UPORTAL soon.

To run this version, you only need to unwind the compressed file to the specified directory. For your convenience, I use my installation directory C: / UPORTAL_2-1 /. We can see Ant, HypersonicsQL, Tomcat, UPORTAL subdirectory ANT: Apache-based build tool. The ANT tool consists of a series of Ant tasks. The task can be called the Java compiler to generate a Class file, or it is also a modified configuration file for testing or product environment, but also call Javadoc to generate a document, run unit test, etc. UPORTAL uses Ant to start and terminate the web container, generate documents, create library tables, increase users and style orders.

Hypersonics QL: An open source Java database, UPORTAL is used to create a packet data. Although HypersonicsQL is free, more product development environments use Oracle, MySQL, or Microsoft SQL Server Database products. Of course, Hypersonics QL is very simple, used to do internal UPORTAL demo is still a good choice.

Tomcat: accommodates all Uportal's Servlets and JSP pages. Apache Tomcat is a reference implementation for the Sun Microsystems web application specification, Tomcat supports servlet 2.3 Specification and JSP 1.2.

Now let this site run, first we need to start the database from the command line from the command line, and enter the UPORTAL installation directory knocking ANT HSQL.,

C: / uportal_2-1> ANT HSQL

C: / uportal_2-1 / Ant_1-5

Buildfile: build.xml

HSQL:

[echo] Starting HSQL

[Java] Server 1.6 is Running

[Java] Press [Ctrl] [C] To Abort

After the database is available, you use the following command to launch Tomcat to access your UPORTAL

C: / uportal_2-1> ANT Tomcatstart

Now the database and application servers run, you can use these accounts into the Uportal to access different interfaces and channels using these accounts by default.

Portal default account

Default Portal UserSuserName Password

Demo Demo

Student Student

Faculty faculty

Staff Staff

Developer Developer, DEVELOPER

Source release

UPortal's second release is for those with J2 EE and product database environments. This version includes only UPORTAL code and compile code, create database tables, generates a profile of document. It is recommended that users have experience in Java application servers and relational databases. This version requires users to configure the running environment.

Uportal with a Java database with only 100KB called HypersonicsQL. This relationship database system is easy to use and is free. HypersonicsQL supports indexing, transaction, connection, reference constraint, Java stored procedures, and functions, and user security. The database also includes a database manager similar to Microsoft's SQL Analyzer, but HyperSonicsQL is a database that is developing. It is recommended to deploy product database background based on UPORTAL, and UPortal is also available to other institutions. A simple interface of the database.

Migrate to product database

Now you have used Uportal and understand some features, you may want to transfer data to a more stable database, Uportal's org.jasig.portal.rdbmservices class provides database services, the original version of the open source object pool Poolman, current version uses RDBMServices, the supplied connection pool is driven, you can use your own product database Listing 1 by configuring your own product database listing 1

Jdbcdriver = org.hsqldb.jdbcdriver

JDBCURL = JDBC: HSQLDB: HSQL: // localhost: 8887

JDBCUSER = SA

JDBCPassword =

My Configuration Rests:

My configuration is:

Listing 2

Jdbcdriver = com.inet.tds.tdsdriver

JDBCURL = JDBC: inetdae7: Localhost: 1433

JDBCUSER = Portaluser

JDBCPassword =

My configuration includes two databases. Store the UPORTAL primary table and UPORTAL channel table. All channels connection Uportal_channels library, UPORTAL frameworks to UPORTAL access display, permission information, and other related information

In addition to increasing attributes in RDBM.Properties, because we use a third-party JDBC driver, you need to put the JAR file in the Uportal's library directory and modify the build.properties file in the uportal_rel-2-1-1 directory.

Jdbcdriver.jar =. / lib / [Yourjdbcdriver] .jar

Use the following command to make the configuration take effect

C: / uportal_2-1 / uportal_rel-2-1-1 / ant deploy

Test with the following command:

C: / uportal_2-1-1 / uportal_rel-2-1-1> Ant dbtest

After the connection is defined, you can create a table structure by the following command:

C: / uportal_2-1 / uportal_rel-2-1-1 / ant db

This command launches the UPORTAL database loader, which will create all tables required for UPORTAL running, and the database loader uses the definition in XML to create a table structure:

Data.xml: Includes data that needs to be inserted into the table Once the table is created, including all channels, support, and interface style information

DBLoader.xml: DBLoader configuration information. Whether to delete all tables, create a new table, or modify the database data

Tables.xml: Store database structure

Here, you should be able to get the same UPORTAL effect with you with a quick version. However, uportal should now connect to your database rear end instead of HypersonicsQL that comes with it.

Inline authentication mechanism

The UPORTAL database provides basic authentication methods. User name and password are accessed in UP_PERSON_DIR Table. The password uses MD5 encryption. Although many environments use other LDAP or NT ACLS to do user authentication, UPortal provides basic structures for users and privileges. Create a user in UPortal, you must use another Ant task called MD5Passwd. Try it in the command line

ANT MD5Passwd -duserName = BRIPPE

You will see prompt entering your password. The task encrypts password and puts user information in UP_PERSON_DIR, then the user can log in to UPORTAL, UPORTAL uses up_person_dir to verify the user. I have a problem when I have a version of UPortal using MD5Passwd encrypted Ant tasks. The associated Class path includes XerceSimp.jar and XML-Apis.jar, and I corrected the error by modifying the following modification.

Xerces Jar contains Xerces XML interpretators, XML-Apis.jar is a XML Javaapis, including Java1.4 SAX, DOM, and other XMLAPI.

By the way, once the user logs into UPORTAL, the display information is placed in the UP_USER table. This table stores which interface to see.

Start your Uportal development

Uportal provides an extended basis to start your development from a very detail place. The entire framework also integrates other features not discussed here: UPORTAL supports auditing, web services, user management, etc. UPORTAL is the best feature that its development architecture allows fast to quickly create new channels and distributed channel development collaboration relationships. Available channels include chat, forum, teaching, weather, notepad, announcement, question and answer, classified advertisement, etc. Although software is developed by the collaborative efforts of educational institutions, it is also very feasible to build other portal environments.

转载请注明原文地址:https://www.9cbs.com/read-14912.html

New Post(0)