Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
    Bookmark Topic Watch Topic
  • New Topic

Confusion about servlet path , context path and path info.[reposting as one of char converted to a s

 
ani jadhao
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Report post to moderator
[reposting as one of char converted to a smiley,]
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 : D
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Report post to moderator
You can edit your post by clicking the icon. Closing this one as there's already other ranchers replying in the other thread. You can also turn off smilies by clicking "Disable smilies in this message" at the bottom of your message when you create it.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!