Hello,
while being through mocks , I came across through couple of path related question from javabeat mock.
In below question , the answers are differing. Specially with reference to a query
string . I far as I know , query string isnt a part of path info.
Req URI = Contextpath+servletpath+pathinfo
Can any one please help me in getting this confusion clear.
Pick out the context path, Servlet path and path information from the request
path '/books/Find/abcd?query=Java' (assuming that the context is 'books')?
a. '/books', '/Find' and '/abcd'
b. '/books', '/Find/abcd' and 'query=Java'
c. '/books/Find', '/abcd' and 'query=Java'
d. None of the above.
ANS : A
What will be the value of the context path, Servlet path and the path info
elements, if the request path is music/Play/album1234?name='xyz' (assuming
that the context of the Web Application is 'music')?
a. Play, album1234 and name='xyz'
b. music, Play and album1234?name='xyz'
c. music, Play and album1234
d. music, Play/ album1234 and name='xyz'
ANS