Grzegorz Kossakowski skrev:
Ralph Goers pisze:
What am I missing? All of these syntaxes look invalid to me. Why
isn't the syntax of the normal form
protocol://[servername[:port]]/path
From the discussions it isn't obvious to me if the block name should
be the server name or part of the path.
Opaque URI:s (see description earlier in the thread) doesn't have any
standardized structure after the scheme part, so syntactically the
servlet protocol is OK. As you can see in the implementation of the
ServletConnection#parseBlockURI(URI uri)
http://svn.apache.org/repos/asf/cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-impl/src/main/java/org/apache/cocoon/servletservice/ServletConnection.java,
it actually make good use of the java.net.URI class for URI parsing.
It could be a server name if we are referencing blocks (servlets) by
their bean's IDs. One of requirement for construct:
protocol://[servername[:port]]/path
is that it is an absolute path, globally unique. The problem is with
servlets referenced by their local aliases (connection names). As far as
I understand RFC 1808[1] this is a proper URL:
protocol:connection_name:/path is a proper URL?
So we could have:
servlet:connection_name:/path
for relative URLs and
servlet://bean_ID:/path
for absolute URLs
Don't like having a bean id where you would expect to have a servername.
I think the servlet:!com.mycompany.block1.servlet:/... would be OK. It
has a correct syntax, at least I don't have any associations to the '!'
and it looks quite "technical" which is good as it mainly is available
for internal use.
/Daniel