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

Doubt in Context,Servlet,Path info

 
sravanthi pulukuri
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hii,
Given a path
'/books/Find/abcd?query=Java'

ContextPath ??
Servlet Path??
Path Info??

please let me know.
 
Ankit Garg
Sheriff
Posts: 9597
36
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well in the path that you have given, the context path would be /books. The other two depends on the servlet mapping. If I map my servlet to /Find/*, then the Servlet Path would be /Find and Path Info would be /abcd. But if I map my servlet to /Find/abcd, then the servlet path would be /Find/abcd, and there would be no path info...
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!