Click here to Skip to main content
15,885,546 members
Home / Discussions / Java
   

Java

 
Questionhi Pin
Md Abdullah Al Masud4-Nov-12 19:00
Md Abdullah Al Masud4-Nov-12 19:00 
Questionjava progarm Pin
hardikv923-Nov-12 22:45
hardikv923-Nov-12 22:45 
AnswerRe: java progarm Pin
Richard MacCutchan4-Nov-12 2:05
mveRichard MacCutchan4-Nov-12 2:05 
AnswerRe: java progarm Pin
Gowtham Gutha15-Nov-12 1:15
Gowtham Gutha15-Nov-12 1:15 
AnswerRe: java progarm Pin
Member 1111060025-Sep-14 16:52
Member 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
Member 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
mveRichard MacCutchan2-Nov-12 0:47 
Question[JAVA] web log file Pin
mariankral1-Nov-12 1:53
mariankral1-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
TorstenH.1-Nov-12 4:03 
Questionquestion Pin
dina rajab28-Oct-12 0:14
dina rajab28-Oct-12 0:14 
AnswerRe: question Pin
Richard MacCutchan28-Oct-12 0:23
mveRichard MacCutchan28-Oct-12 0:23 
Questionjava Pin
dina rajab28-Oct-12 0:11
dina rajab28-Oct-12 0:11 
AnswerRe: java Pin
Richard MacCutchan28-Oct-12 0:23
mveRichard MacCutchan28-Oct-12 0:23 
AnswerRe: java Pin
TorstenH.29-Oct-12 0:38
TorstenH.29-Oct-12 0:38 
AnswerRe: java Pin
April Fans26-Dec-12 17:13
April Fans26-Dec-12 17:13 
QuestionForcing Eclipse webapp home page when debugging Pin
kmg36526-Oct-12 11:53
kmg36526-Oct-12 11:53 
AnswerRe: Forcing Eclipse webapp home page when debugging Pin
hbwhypw31-Oct-12 22:46
hbwhypw31-Oct-12 22:46 
GeneralRe: Forcing Eclipse webapp home page when debugging Pin
kmg3651-Nov-12 10:24
kmg3651-Nov-12 10:24 
GeneralRe: Forcing Eclipse webapp home page when debugging Pin
hbwhypw1-Nov-12 16:04
hbwhypw1-Nov-12 16:04 
QuestionIam Facing Problem While Storing record’s in Access Using Applet … Pin
PrabaPrakash25-Oct-12 22:06
PrabaPrakash25-Oct-12 22:06 
AnswerRe: Iam Facing Problem While Storing record’s in Access Using Applet … Pin
Nagy Vilmos25-Oct-12 23:08
professionalNagy Vilmos25-Oct-12 23:08 
GeneralRe: Iam Facing Problem While Storing record’s in Access Using Applet … Pin
PrabaPrakash26-Oct-12 8:30
PrabaPrakash26-Oct-12 8:30 
GeneralRe: Iam Facing Problem While Storing record’s in Access Using Applet … Pin
jschell26-Oct-12 8:49
jschell26-Oct-12 8:49 
AnswerRe: Iam Facing Problem While Storing record’s in Access Using Applet … Pin
jschell26-Oct-12 8:55
jschell26-Oct-12 8:55 
GeneralRe: Iam Facing Problem While Storing record’s in Access Using Applet … Pin
PrabaPrakash2-Nov-12 20:59
PrabaPrakash2-Nov-12 20:59 

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

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