Ian Bicking wrote:
> On Wed, 2003-01-15 at 00:42, Stuart Donaldson wrote:
..
> > Setting ExtraPathInfo=1 so that you use the new algorithm.
> > Then try to access a URL /WK/foo/bar
> > 
> > The first result I get is that an error trying to import 
> the exception 
> > handler.  This is a side effect of the fact that we have 
> recursed too 
> > deep and then called the exception handler and that failed 
> too.Simple
> > fix for the exception handler problem is just importing the 
> exception 
> > handler in the module rather than where it is needed.
> 
> Okay, that's weird.  What's the fix for that?

I just committed a fix to this, it involves moving
the import of the ExceptionHandler up to the global
level.

> > Now, the real problem is that /WK/foo/bar translates back 
> to the default 
> > context of Examples.  We walk backwards in Examples until 
> we arrive at 
> > Examples/index.py and call that.  Now index.py tries to 
> forward on to 
> > the 'Welcome' page. however the include handling is broken 
> there.  The 
> > Welcome tries to be relative to /WK/foo/bar so it looks for 
> /foo/Welcome 
> > which gets cast back to the default context of 
> /Examples/index.py and 
> > hence the recursion begins.
> 
> Okay, so you don't want to be relative to the URL, you want to be
> relative to the servlet location.  You want to be relative to the
> servletPath, i.e., request.serverSidePath()

Yes, that's with the includeURL patch will do.

> > If you use the patch for include URL I have on SF, it helps 
> matters when 
> > you specify '/Welcome' to make it absolute relative to the 
> top level of 
> > the context.  Although in this case, I would have expected the 
> > extraURLPath to be set to /foo/bar or something like that.  
> In fact the 
> > /foo/bar is lost.  I'm not sure if this last part is a problem.
> 
> No, that seems correct.  I think it would be best if the
> /Examples/Welcome worked too -- i.e., that a context name would be
> expected first if you were doing an absolute redirect.  But 
> that's also
> annoying in most cases.  I just hate contexts and think 
> they're stupid,
> so I dunno what's the best thing.  You could use a lame hack, and make
> //Examples/Welcome work.  But that's too, too lame.

Per the suggestion of Geoff, I have in process a patch to add an optional
Context argument to the include/forward/callMethod... functions that will
help with this. However I don't am not planning on adding that until after
the 0.8 release.  Right now I think we should get it working assuming no
context change for simplicity.

I think that you would want the extraURLPath data in a servlet, you can use
it if you choose.

-Stuart-


-------------------------------------------------------
This SF.NET email is sponsored by: Take your first step towards giving 
your online business a competitive advantage. Test-drive a Thawte SSL 
certificate - our easy online guide will show you how. Click here to get 
started: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0027en
_______________________________________________
Webware-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-devel

Reply via email to