This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
(I dont think there are 3 valid answers - only D E)
Which three are valid URL mappings to a servlet in a web deployment descriptor? (Choose three.) A. */* B. /*.do C. myServlet D. /Myservlet E. /MyServlet/* F. MyServlet/*.isp
Alec Lee
Ranch Hand
Joined: Jan 28, 2004
Posts: 568
posted
0
A crazy thought. Can we use a URL ../myappl/*.do - the URL contains the * character?
As a matter of fact, tomcat gives me this when I deploy with a mapping like B
java.lang.IllegalArgumentException: Invalid <url-pattern> /*.do in servlet mapping at org.apache.commons.digester.Digester.createSAXException(Digester.java:2540) at org.apache.commons.digester.Digester.createSAXException(Digester.java:2566) at org.apache.commons.digester.Digester.endElement(Digester.java:1061) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
David Ulicny
Ranch Hand
Joined: Aug 04, 2004
Posts: 724
posted
0
What about option C. It could be right.
SCJP<br />SCWCD <br />ICSD(286)<br />MCP 70-216
B.Sathish
Ranch Hand
Joined: Aug 18, 2005
Posts: 372
posted
0
Where did you get this question from This is what I had got in my exam. I answered B,D and E and got it right
David Ulicny
Ranch Hand
Joined: Aug 04, 2004
Posts: 724
posted
0
I don't understand how B could be right.
B.Sathish
Ranch Hand
Joined: Aug 18, 2005
Posts: 372
posted
0
I too thought it was crazy, but I could not select the other options as they seemed very wrong (apart from the other 2 correct ones)
Annie McCall
Greenhorn
Joined: Apr 17, 2003
Posts: 21
posted
0
Ok, I tried all of the them and looks like there are only 2 correct answers - D & E.
I tried /*.do on tomcat and got the same error Alec got.
Annie McCall<br />SCJP 1.4<br />SCWCD
Will Lee
Ranch Hand
Joined: Mar 16, 2005
Posts: 58
posted
0
I remember the HFSJ said that for url pattern, if you use path, it must start with "/", or you can use wild cast (*.do) with no start "/". So how answer B could be right?
Don't have book in hand, so I don't know if my memory is "stale"
SCJP 1.4, SCWCD, SCDJWS
Nicky Eng
Ranch Hand
Joined: Mar 26, 2005
Posts: 378
posted
0
yeah yeah....my answer would be D & E .
i think i saw this question somewhere....
why choice B is correct?
is
/*
same as
/*.do
...because .do just a convention, so not be a problem???
for me, answer D & E. [ September 28, 2005: Message edited by: Nicky Eng ]
From NickyEng
Diploma in Computer Studies
SCJP 1.4
SCWCD 1.4
Formula 1 app by Maxis (Playbook)
Rizwan Mohammad
Ranch Hand
Joined: Sep 02, 2005
Posts: 445
posted
0
According to me only there are two valid answers as been discussed.
Rizwan
SCJA, SCJP, SCWCD, SCBCD, SCDJWS.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.