wood burning stoves*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes welcome-file leading traling slash question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "welcome-file leading traling slash question" Watch "welcome-file leading traling slash question" New topic
Author

welcome-file leading traling slash question

Debashish Chakrabarty
Ranch Hand

Joined: May 14, 2002
Posts: 226

The Servlet2.4 specification says that the welcome files specified in the DD (see below) should not have any leading or trailing slashes. HFS jokingly says (page 590) "bad things will happen" if we violate the rule.Yet putting a leading slash works fine with tomcat 5.x and the page shows up fine.

My question is: what is the "bad thing" that can happen? Does it mean that the web-app would not be portable?

Thanks,


Debashish
SCJP2, SCWCD 1.4
Indunil Dasanayaka
Greenhorn

Joined: Dec 12, 2005
Posts: 11
since in the spec it has been defined as there should not be a / vendor can implement the container to either handle the / or not. If it has not been handled there should be an exception.


Shit Happens...
MI Mohammed
Ranch Hand

Joined: Feb 16, 2005
Posts: 146
Hi Debashish,
I like your approach of daring the spec. But, for the exam, just follow the spec because the whole aim of the spec is to free your codes from been vendour
specific. If one follow the spec, your codes are guarranty to run on any web
container.
May be try moving the same code to another container, it might just blow up. For the exam, the spec is the master. Hope it's help.

SCJA SCJP SCWCD SCBCD prog...


SCJA(Beta) SCJP 1.4 SCWCD 1.4 SCBCD 1.3 SCBCD 5.0 beta <br />The more practice we get, the better we are at the exams and in life in general. Pls join me at My DEN.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: welcome-file leading traling slash question