• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

welcome-file-list

 
wrushasen dakhane
Ranch Hand
Posts: 47
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<welcome-file-list>
<welcome-file>/index.html</welcome-file>
</welcome-file-list>

welcome-file with "/" is valid in the above element?
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, it only accepts filenames. No trailing and no leading "/".
 
Niranjan Deshpande
Ranch Hand
Posts: 1277
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
while we are on that topic what about the error page tag ?

<error-page>
<error-code>403</error-code>
<location> </location>
</error-page>
<error-page>
<exception-type>java.sql.SQLException</exception-type>
<location> </location>
</error-page>

does the location need to start with slash ? also one more thing,
can a SERVLET be a hanlder instead of JSP. i believe the answer is YES.
but do we need to this for the exam ? - Mannig's book page 102 onwards has this information !
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
(I think you should have started a new thread, as this is not related to welcome files )

Concerning errors, the value of the location must have a leading �/'.
It can accept mappings to servlet.

do we need to this for the exam

You have to remember that it must start with a '/'
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic