-----BEGIN PGP SIGNED MESSAGE-----
Check out how Apache Tomcat, and Apache Turbine handles this stuff...
Specifically... look at the RequestDispatcher interface:
and the code that implements it
Also... I think includeURL() is misnamed... and misleading. Makes the
developer think that she can include ANY url... should probably be renamed to
On Sunday 12 January 2003 11:06 am, you wrote:
> What should the behavior of the relative URL code be? forward()
> includeURL() and callMethodOfServlet() all do something very similar and
> result in calling request.setURLPath().
> Should root be the root of the context?
> Should root be the root of the adapter? (ie: you can specify another
> context here?)
> And how should it operate when using the psp-handler where there is no
> Context? It would be nice to be able to reference something in a
> webware context.
> Also, all three of the application methods mentioned above both save the
> old urlPath, and servlet, and then restore them again, operating on the
> request in multiple areas, and the transaction._servlet.
> This is very closely related to some problems I am working on in dealing
> with parsing the environment in the request for the psp-handler which I
> am also using, I would like to have a way to reference servlets in the
> webware contexts. However this requires mucking with more information
> inside of the request module. How should a context be referenced
> without overriding URL references which may already exist? ie: if
> "/servlet" refers to a servlet under the current context,
> "/context/otherservlet" would conflict with a servlet in the current
> context and the same name. We could introduce "/../context" as one
> option? Or possibly allow a syntax like ":/context" where the leading
> ':' indictes a switch in context?
> Anyway, I am considering adding a pushURLPath() and popURLPath() on the
> request which would do most of the work mentioned in Luke's patch, but
> also centralize all of the special fixups and cleanups done in the
> Comments anyone?
> Luke Holden wrote:
> >-----BEGIN PGP SIGNED MESSAGE-----
> >Hash: SHA1
> >It looks like includeURL only works with paths reletive to the current
> >For example...
> >If I have the following directory layout:
> >works from
> >SiteContext, but not from SiteContext/test
> >DOES work from SiteContext/test... but is not what I'm looking for =)
> >Shouldnt includeURL work from both the context root AND the current
> > directory? self.includeURL("navigation/nav")
> >for current dir..
> >for context root
> >Here is my traceback:
> >Traceback (most recent call last):
> > File "./WebKit/Application.py", line 394, in dispatchRequest
> > File "./WebKit/Application.py", line 529, in handleInvalidSession
> > File "./WebKit/Application.py", line 564, in handleGoodURL
> > File "./WebKit/Application.py", line 756, in respond
> > File "./WebKit/Transaction.py", line 105, in respond
> > File "./WebKit/HTTPServlet.py", line 38, in respond
> > File "./WebKit/Page.py", line 35, in respondToGet
> > File "./WebKit/Page.py", line 74, in _respond
> > File "/home/alterself/public_html/SiteContext/layout/BaseLayout.py",
> > line 21, in writeHTML
> > File "/home/alterself/public_html/lib/layout/SiteLayout.py", line 6, in
> > self.includeURL("/navigation/nav")
> > File "./WebKit/Page.py", line 340, in includeURL
> > File "./WebKit/Application.py", line 669, in includeURL
> > File "./WebKit/Application.py", line 996, in createServletInTransaction
> >- --
> >Luke Holden
> >eBI Solutions
> >Main: (949) 387-5182
> >Email: lholden@...
> >-----BEGIN PGP SIGNATURE-----
> >Version: GnuPG v1.2.1 (GNU/Linux)
> >-----END PGP SIGNATURE-----
> >This SF.NET email is sponsored by:
> >SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
> >Webware-devel mailing list
Main: (949) 387-5182
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
-----END PGP SIGNATURE-----