Click here to Skip to main content
       

Java

 
Questionhow to Use Java to get the database info by Internet Protocol [modified] PinmemberXMafei5-Nov-12 4:03 
AnswerRe: how to Use Java to get the database info by Internet Protocol PinmvpRichard MacCutchan5-Nov-12 5:24 
GeneralRe: how to Use Java to get the database info by Internet Protocol PinmemberXMafei5-Nov-12 13:58 
GeneralRe: how to Use Java to get the database info by Internet Protocol PinmvpRichard MacCutchan5-Nov-12 22:13 
AnswerRe: how to Use Java to get the database info by Internet Protocol Pinmemberjschell5-Nov-12 8:33 
Questionaddress book in java PinmemberShah Baba5-Nov-12 3:19 
AnswerRe: address book in java PinmvpRichard MacCutchan5-Nov-12 3:24 
Questionhi PinmemberMd Abdullah Al Masud4-Nov-12 19:00 
Questionjava progarm Pinmemberhardikv923-Nov-12 22:45 
AnswerRe: java progarm PinmvpRichard MacCutchan4-Nov-12 2:05 
AnswerRe: java progarm PinmemberGowtham Gutha15-Nov-12 1:15 
QuestionUpdating content of JtextField through jbutton in sql server 2005 using netbeans ide and jdk 1.6 PinmemberMember 95656712-Nov-12 0:14 
AnswerRe: Updating content of JtextField through jbutton in sql server 2005 using netbeans ide and jdk 1.6 PinmvpRichard MacCutchan2-Nov-12 0:47 
Question[JAVA] web log file Pinmembermariankral1-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 PinmemberTorstenH.1-Nov-12 4:03 
Questionquestion Pinmemberdina rajab28-Oct-12 0:14 
AnswerRe: question PinmvpRichard MacCutchan28-Oct-12 0:23 
Questionjava Pinmemberdina rajab28-Oct-12 0:11 
AnswerRe: java PinmvpRichard MacCutchan28-Oct-12 0:23 
AnswerRe: java PinmemberTorstenH.29-Oct-12 0:38 
AnswerRe: java PinmemberApril Fans26-Dec-12 17:13 
QuestionForcing Eclipse webapp home page when debugging Pinmemberkmg36526-Oct-12 11:53 
AnswerRe: Forcing Eclipse webapp home page when debugging Pinmemberhbwhypw31-Oct-12 22:46 
GeneralRe: Forcing Eclipse webapp home page when debugging Pinmemberkmg3651-Nov-12 10:24 
GeneralRe: Forcing Eclipse webapp home page when debugging Pinmemberhbwhypw1-Nov-12 16:04 
QuestionIam Facing Problem While Storing record’s in Access Using Applet … PinmemberPrabakaran199325-Oct-12 22:06 
AnswerRe: Iam Facing Problem While Storing record’s in Access Using Applet … PinmemberNagy Vilmos25-Oct-12 23:08 
GeneralRe: Iam Facing Problem While Storing record’s in Access Using Applet … PinmemberPrabakaran199326-Oct-12 8:30 
GeneralRe: Iam Facing Problem While Storing record’s in Access Using Applet … Pinmemberjschell26-Oct-12 8:49 
AnswerRe: Iam Facing Problem While Storing record’s in Access Using Applet … Pinmemberjschell26-Oct-12 8:55 
GeneralRe: Iam Facing Problem While Storing record’s in Access Using Applet … PinmemberPrabakaran19932-Nov-12 20:59 
Questiondisplay GROUP BY result [modified] Pinmemberuti123fil23-Oct-12 21:48 
AnswerRe: display GROUP BY result PinmvpRichard MacCutchan23-Oct-12 22:05 
GeneralRe: display GROUP BY result Pinmemberuti123fil23-Oct-12 22:36 
GeneralRe: display GROUP BY result PinmvpRichard MacCutchan23-Oct-12 22:41 
AnswerRe: display GROUP BY result PinmvpRichard MacCutchan24-Oct-12 1:14 
GeneralRe: display GROUP BY result Pinmemberuti123fil8-Nov-12 17:11 
QuestionHow to make GAME by Java? Pinmembernghia09t322-Oct-12 16:05 
AnswerRe: How to make GAME by Java? PinmemberTorstenH.22-Oct-12 20:32 
AnswerRe: How to make GAME by Java? PinmvpRichard MacCutchan22-Oct-12 22:38 
AnswerRe: How to make GAME by Java? PinmemberGowtham Gutha9-Nov-12 9:05 
QuestionDeveloping Cloud Storage Services PinmemberMember 925151319-Oct-12 4:20 
AnswerRe: Developing Cloud Storage Services PinmemberTorstenH.22-Oct-12 0:28 
GeneralRe: Developing Cloud Storage Services PinmemberMember 925151322-Oct-12 1:24 
AnswerRe: Developing Cloud Storage Services Pinmemberjschell22-Oct-12 8:30 
QuestionAbout java swings Pinmemberlkishore32818-Oct-12 21:07 
AnswerRe: About java swings PinmvpRichard MacCutchan18-Oct-12 23:22 
Questionjava code for a law firm application Pinmemberkibuule18-Oct-12 8:33 
AnswerRe: java code for a law firm application Pinmemberjschell18-Oct-12 10:04 
AnswerRe: java code for a law firm application PinmemberJoan Murt21-Oct-12 20:53 

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.140415.2 | Last Updated 16 Apr 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid