help me_have puzzle in programing java

Challenge

Master a simple Java programming challenge

As the principal engineer of an HTTP web server, you are responsible for imp

lementing the request processing subsystem of the server.

An incoming request for a specific resource, identified by an URI, must be d

ispatched to the appropriate handler according to the server configuration w

hich maps URIs to request handlers. 'HandlerFactory.getHandler' must be impl

emented:

public class HandlerFactory

{

public String getHandler(String[] config, String requestUri)

{

}

}

The string array 'config' contains URI patterns and handler names. Two conse

cutive values form a key-value pair comprised of URI pattern and handler. 'r

equestUri' represents an incoming request, the URI to match against the conf

igured handlers. 'getHandler' must return the correct handler for a given UR

I as a string value.

An URI pattern never contains wildcards and represents the start of an URI s

tring, a prefix. Matching must be implemented accordingly. The handler with

the longest matching URI pattern wins if more than one pattern matches. If n

o handler can be found, "3loRO2" must be returned.

Example input:

String[] config: { "/", "MainServlet", "/nav", "NavigationServlet" }

String requestUri: "/nav/test"

Correct result: "NavigationServlet"

In this example, the configuration contains a mapping of "/" to "MainServlet

" and "/nav" to "NavigationServlet". In the case of an incoming URI "/nav/te

st.nav", "NavigationServlet" is the correct choice because its pattern is lo

nger than that of "MainServlet".

can you programming according to sample:

public class HandlerFactory

{

public String getHandler(String[] config, String requestUri)

{

;

}

}

that all!

if you can answer, please you will send to me by my email bichlong@gmail.com

Thank you!

[2053 byte] By [230784a] at [2007-10-3 3:32:53]
# 1
www.rentacoder.com
CeciNEstPasUnProgrammeura at 2007-7-14 21:27:11 > top of Java-index,Java Essentials,Java Programming...
# 2
O goody, another idle lazy cheating"do my work for me" oh wait, no, its a challenge.Thanks for the email address bichlong@gmail.com Im sure we will have a lot of fun signing you up for porn sites
ScarletPimpernela at 2007-7-14 21:27:11 > top of Java-index,Java Essentials,Java Programming...
# 3

> Challenge

not in the slightest.

but I'd like to reply, is your email address correct?

bichlong@gmail.com

better double check

bichlong@gmail.com

jeez, I hope by doing this the spam bots don't get hold of

bichlong@gmail.com

OK , I've just sent off an email to

bichlong@gmail.com

if you don't get it, please reply to:

bichlong@gmail.com

Michael_Dunna at 2007-7-14 21:27:11 > top of Java-index,Java Essentials,Java Programming...
# 4
Do spam bots pick up emails such as bichlong@gmail.com or do they look for mailto:bichlong@gmail.com ? better avoid mailto:bichlong@gmail.com or bichlong@gmail.com otherwise bichlong@gmail.com will be getting spammed.
ScarletPimpernela at 2007-7-14 21:27:11 > top of Java-index,Java Essentials,Java Programming...
# 5
were you programming it?how is it?
230784a at 2007-7-14 21:27:11 > top of Java-index,Java Essentials,Java Programming...
# 6
i think it will not be very difficult.but it also isn't easy.who could programming it?waiting for youif you think bichlong@gmail wrong, you can send to me vuluynh@yahoo.comlucky for you
230784a at 2007-7-14 21:27:11 > top of Java-index,Java Essentials,Java Programming...
# 7
> were you programming it?> how is it?Yes bichlong@gmail.com we are and we will send it to mailto:bichlong@gmail.com
ScarletPimpernela at 2007-7-14 21:27:11 > top of Java-index,Java Essentials,Java Programming...
# 8
oh, thank you very muchi am waiting for you.
230784a at 2007-7-14 21:27:11 > top of Java-index,Java Essentials,Java Programming...
# 9

> i think it will not be very difficult.

> but it also isn't easy.

> who could programming it?

> waiting for you

> if you think bichlong@gmail wrong, you can send to me

> vuluynh@yahoo.com

> lucky for you

So lets get that right, if not bichlong@gmail.com or mailto:bichlong@gmail.com we can send it to vuluynh@yahoo.com

or mailto:vuluynh@yahoo.com

vuluynh@yahoo.com ? I see you use yahoo for vuluynh@yahoo.com and gmail for bichlong@gmail.com

ScarletPimpernela at 2007-7-14 21:27:11 > top of Java-index,Java Essentials,Java Programming...
# 10
yes, i use two emailbichlong@gmail.com and vuluynh@yahoo.com
230784a at 2007-7-14 21:27:11 > top of Java-index,Java Essentials,Java Programming...
# 11
> oh, thank you very much> i am waiting for you.When do you need it for bichlong@gmail.com ?
ScarletPimpernela at 2007-7-14 21:27:11 > top of Java-index,Java Essentials,Java Programming...
# 12
anywhen, but if you can, i hope sooner the better
230784a at 2007-7-14 21:27:11 > top of Java-index,Java Essentials,Java Programming...
# 13
> anywhen, but if you can, i hope sooner the betterIs this a school project?
ScarletPimpernela at 2007-7-14 21:27:11 > top of Java-index,Java Essentials,Java Programming...
# 14
right, it is a my project of my teacher
230784a at 2007-7-14 21:27:11 > top of Java-index,Java Essentials,Java Programming...
# 15
> right, it is a my project of my teacherI dont understand, is it your teachers project or a project from your teacher.?Wot school r u at, r u near bangalore?
ScarletPimpernela at 2007-7-21 10:12:49 > top of Java-index,Java Essentials,Java Programming...
# 16
I dont really think its a school project or any other.I think thats for to join the www.myjavaserver.com member.I remember solving the same problem when i became its member.A guy who wants to join a site for java programming but cant solve theproblem, how
lupansanseia at 2007-7-21 10:12:49 > top of Java-index,Java Essentials,Java Programming...
# 17
> I think thats for to join the www.myjavaserver.com> member.> I remember solving the same problem when i became its> member.I didn't have to do that to join. O_o But that was a while ago.
CeciNEstPasUnProgrammeura at 2007-7-21 10:12:49 > top of Java-index,Java Essentials,Java Programming...
# 18
Thou ought to perform thy own assignments
Jamwaa at 2007-7-21 10:12:49 > top of Java-index,Java Essentials,Java Programming...
# 19
ScarletPimpernel: I know it's unnatural, but I love you and I want to bear your children. You just made me snark coffee all over my desk. Bravo!J
jagulara at 2007-7-21 10:12:49 > top of Java-index,Java Essentials,Java Programming...