Click here to Skip to main content
11,632,104 members (72,289 online)
   

Java

 
Questionhi Pin
Md Abdullah Al Masud4-Nov-12 19:00
memberMd Abdullah Al Masud4-Nov-12 19:00 
Questionjava progarm Pin
hardikv923-Nov-12 22:45
memberhardikv923-Nov-12 22:45 
AnswerRe: java progarm Pin
Richard MacCutchan4-Nov-12 2:05
mvpRichard MacCutchan4-Nov-12 2:05 
AnswerRe: java progarm Pin
Gowtham Gutha15-Nov-12 1:15
memberGowtham Gutha15-Nov-12 1:15 
AnswerRe: java progarm Pin
Member 1111060025-Sep-14 16:52
memberMember 1111060025-Sep-14 16:52 
QuestionUpdating content of JtextField through jbutton in sql server 2005 using netbeans ide and jdk 1.6 Pin
Member 95656712-Nov-12 0:14
memberMember 95656712-Nov-12 0:14 
AnswerRe: Updating content of JtextField through jbutton in sql server 2005 using netbeans ide and jdk 1.6 Pin
Richard MacCutchan2-Nov-12 0:47
mvpRichard MacCutchan2-Nov-12 0:47 
Question[JAVA] web log file Pin
mariankral1-Nov-12 1:53
membermariankral1-Nov-12 1:53 
Hi,
sorry for my bad English.
I need in JAVA.

I have a log file from a Web server with 120,000 lines.
Example of input file:
10.160.0.10;16.11.2011 12:56;/;-;"Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0"
10.160.0.100;14.11.2011 7:22;/;-;"Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0"
10.160.0.100;14.11.2011 10:45;/;-;"Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0"
10.160.0.100;14.11.2011 10:53;/;-;"Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)"

I need to compare the IP address in the first line with IP in the second line
and at the same time
to compare the last box that contains the version of the web browser with version in the second line.
And second line with third line etc.

If first IP is same as second IP and together first version is same as second version
then add to the end of line info example #1 (that will be mean that it is first user)

If IP or version are different then add to the end of line #2 (second user).

It identifies users based on IP address and User-Agent field (based on different versions of a web browser).

Example of ouput file:
10.160.0.10;16.11.2011 12:56;/;-;"Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0";#1
10.160.0.100;14.11.2011 7:22;/;-;"Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0";#2
10.160.0.100;14.11.2011 10:45;/;-;"Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0";#2
10.160.0.100;14.11.2011 10:53;/;-;"Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)";#3

Do you have any idea how to do this?
Which method to use?
Thank you for help.
AnswerRe: [JAVA] web log file Pin
TorstenH.1-Nov-12 4:03
memberTorstenH.1-Nov-12 4:03 
Questionquestion Pin
dina rajab28-Oct-12 0:14
memberdina rajab28-Oct-12 0:14 
AnswerRe: question Pin
Richard MacCutchan28-Oct-12 0:23
mvpRichard MacCutchan28-Oct-12 0:23 
Questionjava Pin
dina rajab28-Oct-12 0:11
memberdina rajab28-Oct-12 0:11 
AnswerRe: java Pin
Richard MacCutchan28-Oct-12 0:23
mvpRichard MacCutchan28-Oct-12 0:23 
AnswerRe: java Pin
TorstenH.29-Oct-12 0:38
memberTorstenH.29-Oct-12 0:38 
AnswerRe: java Pin
April Fans26-Dec-12 17:13
memberApril Fans26-Dec-12 17:13 
QuestionForcing Eclipse webapp home page when debugging Pin
kmg36526-Oct-12 11:53
memberkmg36526-Oct-12 11:53 
AnswerRe: Forcing Eclipse webapp home page when debugging Pin
hbwhypw31-Oct-12 22:46
memberhbwhypw31-Oct-12 22:46 
GeneralRe: Forcing Eclipse webapp home page when debugging Pin
kmg3651-Nov-12 10:24
memberkmg3651-Nov-12 10:24 
GeneralRe: Forcing Eclipse webapp home page when debugging Pin
hbwhypw1-Nov-12 16:04
memberhbwhypw1-Nov-12 16:04 
QuestionIam Facing Problem While Storing record’s in Access Using Applet … Pin
Prabakaran199325-Oct-12 22:06
memberPrabakaran199325-Oct-12 22:06 
AnswerRe: Iam Facing Problem While Storing record’s in Access Using Applet … Pin
Nagy Vilmos25-Oct-12 23:08
memberNagy Vilmos25-Oct-12 23:08 
GeneralRe: Iam Facing Problem While Storing record’s in Access Using Applet … Pin
Prabakaran199326-Oct-12 8:30
memberPrabakaran199326-Oct-12 8:30 
GeneralRe: Iam Facing Problem While Storing record’s in Access Using Applet … Pin
jschell26-Oct-12 8:49
memberjschell26-Oct-12 8:49 
AnswerRe: Iam Facing Problem While Storing record’s in Access Using Applet … Pin
jschell26-Oct-12 8:55
memberjschell26-Oct-12 8:55 
GeneralRe: Iam Facing Problem While Storing record’s in Access Using Applet … Pin
Prabakaran19932-Nov-12 20:59
memberPrabakaran19932-Nov-12 20:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web02 | 2.8.150728.1 | Last Updated 25 Jul 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid