• Post Reply Bookmark Topic Watch Topic
  • New Topic

EPractice Lab mock exam 1 the url of getRequestDispatch methods  RSS feed

 
Himai Minh
Ranch Hand
Posts: 1573
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

For example, in a context rooted at "/" and a request to /myWebFolder/index.html, a request dispatch obtained via
ServletRequest.getRequestDispatch("index.html") will behave exactly like a call to ServletContext.getRequestDispatch("/myWebFolder/index.html")


First of all, the NetBean platform does not let me set / as a context path. I have to set it as /aName.
Secondly, if the index.html is in myWebFolder directory,
or


should be used.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!