hepabolu wrote:
Guys,
this looks like a bug, either in the documentation or in the code. Can
someone tell me what it's the correct way (i.e. which one is wrong)?
Neither. Both code and documentation are correct - but may be documentation can
be made easier to understand.
Current doc, emphasis mine:
Returns the part of this request's URL from the protocol
name up to the query string in the *first line* of the HTTP
request.
For the URL:
http://localhost:8888/xmlweb/test.uri
Browser will issue HTTP request, whose first line will be:
GET /xmlweb/test.uri HTTP/1.1
From this first line, getRequestURI will extract:
/xmlweb/test.uri
Here is link to Sun's doc:
http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpServletRequest.html#getRequestURI()
Vadim
Bye, Helma
-------- Original Message --------
Subject: requestURI -- documentation bug?
Date: Mon, 08 Aug 2005 11:57:13 +0200
From: Reinhard Haller <[EMAIL PROTECTED]>
Reply-To: [email protected]
Newsgroups: gmane.text.xml.cocoon.user
Hi,
I'm retrieving the current URI from a request to set
the base in the HTML header in the response.
The documentation for the request input module
states for the requestURI:
" Returns the part of this request's URL from the protocol
name up to the query string in the first line of the HTTP
request."
Given a request in the form
http://localhost:8888/xmlweb/test.uri
this should be
localhost:8888/xmlweb/test.uri
Using the input module within the sitemap the
term {request:requestURI} results in:
/xmlweb/test.uri
Are the docs wrong or the implementation?
Greetings
Reinhard