cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robin Wyles <...@robinwyles.com>
Subject MultipartHttpServletRequest in a generator
Date Mon, 16 Jun 2008 20:40:02 GMT
Hi,

How can I get hold of a MultipartHttpServletRequest in a generator?

If I do this...

final WebApplicationContext parentContext =  
WebAppContextUtils.getCurrentWebApplicationContext();
final ProcessInfoProvider infoProvider = (ProcessInfoProvider)  
parentContext.getBean(ProcessInfoProvider.ROLE);
HttpServletRequest request = infoProvider.getRequest();
MultipartHttpServletRequest mpr = (MultipartHttpServletRequest) request;

I get the following error when the final line is executed...

java.lang.ClassCastException: $Proxy13

Eclipse debugger shows that request is an instance of  
MultipartHttpServletRequest.

What's the secret?

Cheers,

Robin
Mime
View raw message