Hi, JPL:
Thank you for your kind answer.
I found there is no clear solution.
JPL <[EMAIL PROTECTED]> wrote:
> > Dear folks:
> >
> > I hava almonst same question.
> > I am using jsp1.0 (maybe same as JSDK 2.1).
> > I want to restrict to accesss some directory.
> ...
> > If I change to
> >
> > String s = "/restricted"+req.getPathInfo();
> >
> > it makes infinite loop. How should I do?
>
> Hi Ryo,
>
> It seems to me that your Restrict server forwards a request
> to itself (because of the mapping), instead of serving the HTML
> file when it should, and therefore you get an infinite loop.
> All what comes to my mind is that you should keep the
> restricted files in another directory, not mapped to any
> servlet and inaccessible by the web server directly,
> and let your servlet load them from there.
You are right. I can write such code, but it has almost same
function as RequestDispatcher without servlet mapping order.
I saw JDC example how "http://developer.java.sun.com/developer/"
restricts accesses. It uses some deprecated methods in JSDK 2.x and
com.sun.* classes. It doesn't work on JSDK 2.1.
Does JDC team have new example for JSDK 2.1?
Thanks in advance.
Ryo Iwasaki, NTT
[EMAIL PROTECTED]
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html