No, what's there is correct. What this code is doing is stripping off the 
extension if extension mapping is being used. So if the path started out as:

/foo/bar/baz.do

the end result would be:

/foo/bar/baz

The test for (period > slash) ensures that the period really indicates an 
extension, and we don't trip over something like:

/foo.bar/baz

by stripping off everything after the period.

--
Martin Cooper


At 06:53 AM 7/6/01, Jonathan wrote:
>Gentlemen.  In the ActionServlet's processPath() method the below code exists.
>
>
>processPath(HttpServletRequest request) {
>     .......
>     .......
>     if ((period >= 0) && (period > slash))path = path.substring(0, period);
>     .......
>}
>
>
>
>
>Shouldnt the code instead read:
>     if ((period >= 0) && (period > slash))path = path.substring(slash, 
> period);


Reply via email to