protected Environment getEnvironment(String servletPath,
String uri,
ActionRequest req,
ActionResponse res)
throws Exception {
PortletEnvironment env;
String formEncoding = req.getParameter("cocoon-form-encoding");
if (formEncoding == null) {
formEncoding = this.defaultFormEncoding;
}
env = new PortletEnvironment(servletPath,
uri,
this.portletContextURL,
req,
res,
this.portletContext,
(PortletContext) this.appContext.get(Constants.CONTEXT_ENVIRONMENT_CONTEXT),
this.containerEncoding,
formEncoding);
env.enableLogging(getLogger());
return env;
}