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

Choosing the welcome file from the list

 
Narasimha Rao B.
Ranch Hand
Posts: 205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am having a doubt on the selection of welcome please clarify the same.

User requested URL is - http://www.abc.com/foo/bar/abc.jsp
Now no servlet or jsp file is matching to this request(when you check in <servlet-mapping> attribute ) . No welcome files are present in 'bar' directory, but a welcome file is present in the directory 'foo' and it is listed in <welcome-file-list>. My doubt is, Will this welcome file listed in 'foo' directory will be served or not?

Thanks in Advance,
 
Thirunas Deeps
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. you will get 404 error. if your url is points to directory then welcome file list will take care of the output. if your url is a file and if it is not found, you will get 404 error.
 
Radhika Jonnalagadda
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It depends on the application server
 
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
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!