Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Conversion of RequestFacade into ApplicationHttpRequest request

 
swapnil vedpathak
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64970
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic