I know this might sound crazy...but i am integrating with some third party api's and unfortunately they have a utility class which only takes a pageContext object..I did some peeking around and found that they are doing a lot of stuff with pageContext... Is there a way to get to or create a pageContext from HttpServeletRequest.
+1
A:
You could use MockPageContext from the Spring API. It's designed for testing, but it would do a fine job of fooling the app into thinking it was the real thing.
skaffman
2009-07-28 08:01:12
Thanks for the answer...but Unfortunaley that solution ...I don't want to fool my app....
2009-07-28 11:10:07
Fooling your app is exactly what you're trying to do. You don't have a PageContext, and you want to simulate one. MockPageContext is a perfectly valid implementation of PageContext, you're going to have to use something like it anyway. Might as well use one that's already written.
skaffman
2009-07-28 11:26:47
well the point that you are making is correct...but i am still not sure...will fool around with some workarounds a bit..
2009-07-29 04:21:54