cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ralph Goers <>
Subject RE: finding the URL of the current Cocoon application?
Date Sat, 04 Sep 2004 22:55:03 GMT
At 9/4/2004  09:08 AM, you wrote:

>Anyway, Ralph, I would be happy to hear from you how to get the
>http servlet request from Java. Especially if it's different from
>{request:servletPath} and {request:requestURI}, both
>of which return the outer URI.

If real path is what I think it is it would be the value from getRealPath() 
from the session context.  That will return null if you are in a war file.

As for getting the HttpServletRequest, many Cocoon interfaces pass the 
object model as a parameter on methods. To get the HttpServletRequest you do:

HttpServletRequest servletRequest = 

It would be trivial to write a HttpRequest input module. Just take the 
Request input module and replace the line that retrieves the request with 
the one above.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message