This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Conversion of  RequestFacade into ApplicationHttpRequest request Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » Tomcat
Bookmark "Conversion of  RequestFacade into ApplicationHttpRequest request" Watch "Conversion of  RequestFacade into ApplicationHttpRequest request" New topic
Author

Conversion of RequestFacade into ApplicationHttpRequest request

swapnil vedpathak
Greenhorn

Joined: Mar 15, 2006
Posts: 8
Hi,
my appplication involves communicating an Jsp page on server from Stand-alone Java Program,which is on my local machine.In this application,i am getting the value of Request object in the form of "org.apache.catalina.connector.RequestFacade@b40443" instead i want to receive the request as "org.apache.catalina.core.ApplicationHttpRequest@3f3b9b".So is it possible to convert the Request Type?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61309
    
  66

RequestFacade implement ServletRequest, so you can simply cast the object if you need to.

In order to be able to cast to an HttpServletRequest you'd need an HttpRequestFacade instance. Is it possible that your instance is an HttpRequestFacade down-casted to a RequestFacade?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
GeeCON Prague 2014
 
subject: Conversion of RequestFacade into ApplicationHttpRequest request