Grzegorz Kossakowski wrote:
Reinhard Poetz pisze:
I've rewritten the ServletConnection and it always expects now globally
absolute URIs. If a service-relative URI is being resolved, the
ServletSource can translate it into an absolute one.
It looks like you implying that ServletConnection should never be used
directly only ServletSource, instead. Am I guessing right?
ServletSource is only available if you use the ServletService Framework together
with Cocoon. So I think that ServletConnection should become public API too.
We could offer two types of ServletConnections:
* RelativeServletConnection that works relative to the current servlet context
* AbsoluteServletConnection that expects the servlet service name (= the
name of the Spring bean)
Actually I've already implemented it this way ...
WDYT?
This should fix the cache key generation problem too.
Yep, I hope so.
Plus sign doesn't look naturally for me. Are there any other options?
Citing RFC 2396:
Scheme names consist of a sequence of characters beginning with a lower
case letter and followed by any combination of lower case letters, digits,
plus ("+"), period ("."), or hyphen ("-"). For resiliency, programs
interpreting URI should treat upper case letters as equivalent to lower
case in scheme names (e.g., allow "HTTP" as well as "http").
scheme = alpha *( alpha | digit | "+" | "-" | "." )
But since I strongly discourage from using absolute URIs directly, I don't
consider it being a big issue.
Aha, ok. I forgot that absolute URIs shouldn't be used directly in general.
Then I'm fine with plus sign.
It brings interesting question: if user is not supposed to use absolute URIs
directly will their usage be limited only to making ServletSource conforming
the API of Source interface thus generating proper cache keys? I was thinking
about dynamic connections between servlets but I would like to hear your
opinion.
For me fixing the cache key generation problem is only a positive side effect of
my current work. I need absolute servlet URIs for a special generator (or maybe
a source, don't know yet) whose output depends on the available servlet services
which makes it impossible to define them as connections beforehand.
Probably it's very similar to what you call "dynamic connections".
--
Reinhard Pötz Managing Director, {Indoqa} GmbH
http://www.indoqa.com/en/people/reinhard.poetz/
Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member, PMC Chair [EMAIL PROTECTED]
_________________________________________________________________________