Define goals within the Division of Labor to complete non-open source XT login statistics

Source: Internet
Author: User

The online statistics function has far-reaching significance in enterprise-level applications. For example, some State-owned enterprises gradually deepen information construction, the maturity or ease of use of such construction is often reflected in the number of users and frequency of applications. This is also a reference for evaluating the effectiveness of the company's IT department.


Hy proposed a statistical function for filenet workplacext (XT), which is based on the real login application of users. The popular method is to use httpsessionlistener to listen for session creation and destruction (this is not discussed here ). In this practice, the top task of the transformation of XT itself is to find a way to obtain login information from non-open-source XT applications and add their own statistical functions.


First, obtain the userid and password on the wcmdefault. jsp page and save them to the session. The Code is as follows,

WcmDataStore dataStore = controller.getDataStore(); WcmServerCredentials credentials = dataStore.getServerCredentials();String userid = credentials.getUserId();String password = credentials.getPassword();session.setAttribute("loginStatisticUserId", userid);session.setAttribute("loginStatisticPassword", password);

Then add an Ajax call to the Browse. jsp page and call the logon statistics servlet (self-developed). Here, you can integrate the logic of the logon statistics logon process. The Code is as follows,

<script type="text/javascript">   Window.onload = $.ajax({    type:'get',    url:'loginStatisticServlet',    data:'data=',    dataType:'text',    success:function(msg){    },    error:function(){    }  });</script>

Then create a servlet (the login logic is written in this class ),

 

Finally, configure in Web. xml. The Code is as follows,


<servlet>    <servlet-name>LoginStatisticAction</servlet-name>    <servlet-class>com.LoginStatisticServlet</servlet-class>  </servlet>    <servlet-mapping>    <servlet-name>LoginStatisticAction</servlet-name>    <url-pattern>/loginStatisticServlet</url-pattern>  </servlet-mapping> 

Similar issues are not too complex. You only need to decompile the project, read and analyze the login process, and find a way to obtain the login information. In the process of exploration, we must clarify our primary goal and accomplish it accurately without redundancy. For example, we need to conduct statistical work in several stages, where obtaining user login information is a stage, and converting user IDs into user names and other in-depth processing should be classified into subsequent stages, do not confuse them. Otherwise, it is difficult to control the workload, especially in the case of division of labor and cooperation. There are several tasks launched before the end of this month, and the division of labor to complete their respective good or exclusive (done similar or every time) functions, You need to clarify the goal, complete it accurately without redundancy (excluding the perspective of another high position ).


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.