>> Reading the API, it looks as if this should have been the behaviour
>> all along, but that's moot. The question is: How can I prevent direct
[quoted text clipped - 3 lines]
>
> Tom Hawtin
Hmmm -- must be something I'm missing, because I get a 404 error:
The requested resource (/path/page.jsp) is not available.
Does the forward path have to change?
-- Robert
Lew - 20 Jun 2007 18:17 GMT
Tom Hawtin <usenet@tackline.plus.com> wrote in
>> Put the JSP under /WEB-INF/.
>>
>> Tom Hawtin
> Hmmm -- must be something I'm missing, because I get a 404 error:
>
> The requested resource (/path/page.jsp) is not available.
It is for the correct value of 'path'.
> Does the forward path have to change?
It has to include the WEB-INF/ path node.
Either:
RequestDispatcher dispatcher =
request.getRequestDispatcher( "/application/WEB-INF/page.jsp" );
or just
RequestDispatcher dispatcher =
request.getRequestDispatcher( "WEB-INF/page.jsp" );
I usually use relative paths (always down from current, never up).
BTW, if you had provided an SSCCE instead of paraphrasing as 'path',
'page.jsp', etc., you'd have had a much clearer question. Notice how
hand-waving over 'path' actually obscured the issue?

Signature
Lew
Robert Watkins - 20 Jun 2007 21:02 GMT
> Tom Hawtin <usenet@tackline.plus.com> wrote in
>>> Put the JSP under /WEB-INF/.
[quoted text clipped - 4 lines]
>
> It has to include the WEB-INF/ path node.
Thanks for this final piece of the puzzle. All is working now, with the
desired effect.
-- Robert
Lew - 20 Jun 2007 19:24 GMT
>>> Reading the API, it looks as if this should have been the behaviour
>>> all along, but that's moot. The question is: How can I prevent direct
[quoted text clipped - 10 lines]
>
> -- Robert
Tom Hawtin <usenet@tackline.plus.com> wrote in
>> Put the JSP under /WEB-INF/.
>>
>> Tom Hawtin
> Hmmm -- must be something I'm missing, because I get a 404 error:
>
> The requested resource (/path/page.jsp) is not available.
It is for the correct value of 'path'.
> Does the forward path have to change?
It has to include the WEB-INF/ path node.
Either:
RequestDispatcher dispatcher =
request.getRequestDispatcher( "/application/WEB-INF/page.jsp" );
or just
RequestDispatcher dispatcher =
request.getRequestDispatcher( "WEB-INF/page.jsp" );
I usually use relative paths (always down from current, never up).
BTW, if you had provided an SSCCE instead of paraphrasing as 'path',
'page.jsp', etc., you'd have had a much clearer question. Notice how
hand-waving over 'path' actually obscured the issue?

Signature
Lew
Lew - 20 Jun 2007 19:37 GMT
>>> Reading the API, it looks as if this should have been the behaviour
>>> all along, but that's moot. The question is: How can I prevent direct
>>> access to the JSP in another way?
Tom Hawtin <usenet@tackline.plus.com> wrote in
>> Put the JSP under /WEB-INF/.
> Hmmm -- must be something I'm missing, because I get a 404 error:
>
> The requested resource (/path/page.jsp) is not available.
It is for the correct value of 'path'.
> Does the forward path have to change?
It has to include the WEB-INF/ path node.
Either:
RequestDispatcher dispatcher =
request.getRequestDispatcher( "/application/WEB-INF/page.jsp" );
or just
RequestDispatcher dispatcher =
request.getRequestDispatcher( "WEB-INF/page.jsp" );
I usually use relative paths (always down from current, never up).
BTW, if you had provided an SSCCE instead of paraphrasing as 'path',
'page.jsp', etc., you'd have had a much clearer question. Notice how
hand-waving over 'path' actually obscured the issue?

Signature
Lew