Re: Getting response from a external URL

2011-12-21 Thread Pablo Díaz
Thank you so much it's works, very well ... The correct form was the next: (WebApplication) protected void init() { super.init(); mountPage("Init.do",HomePage.class); mountPage("Viewer.do",ViewerPage.class); *mountResource("ProxyMapserver.do",new ProxyAction());*

Re: Getting response from a external URL

2011-12-21 Thread Martin Grigorov
On Wed, Dec 21, 2011 at 7:50 PM, Pablo Díaz wrote: > Thank you for your answer but I think this is only correct when you are > returning a CharSequence, what's happen when you like returning Image, for > example? > If you need to return an Image then definitely you don't need to extend a Page. Se

Re: Getting response from a external URL

2011-12-21 Thread Pablo Díaz
Thank you for your answer but I think this is only correct when you are returning a CharSequence, what's happen when you like returning Image, for example? El 21/12/11 10:33, Martin Grigorov escribió: The problem with EmptyRequestHandler is that the previous response is reset and an empty is w

Re: Getting response from a external URL

2011-12-21 Thread Martin Grigorov
The problem with EmptyRequestHandler is that the previous response is reset and an empty is written to the client. There are several solutions for your problem: 1) use a IResource instead of a Page. You don't use components anyway. See wicketinaction.com/2011/07/wicket-1-5-mounting-resources/ for

Re: Getting response from a external URL

2011-12-20 Thread Igor Vaynberg
what is the stack trace look like now? also, no need to extend a webpage, why not just impplement IRequestHandler directly and mount it somewhere so you can construct urls to it... -igor On Tue, Dec 20, 2011 at 11:24 AM, Pablo Díaz wrote: > I've done that, but I get the same result :( > > El 20

Re: Getting response from a external URL

2011-12-20 Thread Pablo Díaz
I've done that, but I get the same result :( El 20/12/11 20:18, Igor Vaynberg escribió: (httpservletresponse)getresponse().getcontainerresponse() -igor On Tue, Dec 20, 2011 at 10:58 AM, Pablo Díaz wrote: Ok, but How I can get the httpservletresponse object to write in it? I'm extending the W

Re: Getting response from a external URL

2011-12-20 Thread Igor Vaynberg
(httpservletresponse)getresponse().getcontainerresponse() -igor On Tue, Dec 20, 2011 at 10:58 AM, Pablo Díaz wrote: > Ok, but How I can get the httpservletresponse object to write in it? I'm > extending the WebPage class ... > > El 20/12/11 19:26, Igor Vaynberg escribió: > >> try writing directl

Re: Getting response from a external URL

2011-12-20 Thread Pablo Díaz
Ok, but How I can get the httpservletresponse object to write in it? I'm extending the WebPage class ... El 20/12/11 19:26, Igor Vaynberg escribió: try writing directly into httpservletresponse instead of wicket's response. there is a bug fix for this in the upcoming release -igor On Tue,

Re: Getting response from a external URL

2011-12-20 Thread Igor Vaynberg
try writing directly into httpservletresponse instead of wicket's response. there is a bug fix for this in the upcoming release -igor On Tue, Dec 20, 2011 at 10:03 AM, Pablo Díaz wrote: > Ok, thank you, I'm not getting the error if I use your code, but I'm not > able to gets the response (I

Re: Getting response from a external URL

2011-12-20 Thread Pablo Díaz
Ok, thank you, I'm not getting the error if I use your code, but I'm not able to gets the response (I always get a blank image, when I must get a map). I mean, I only like getting the request done from someone and check if he has enough privileges to do some operation Then, I change some para

Re: Getting response from a external URL

2011-12-20 Thread Igor Vaynberg
in the future, start with the error :) you have to tell wicket that it should not render the page after you have written the data out... output.write(data); getrequestcycle().replaceallrequesthandlers(new EmptyRequestHandler()); -igor On Tue, Dec 20, 2011 at 8:54 AM, Pablo Díaz wrote: > Bec

Re: Getting response from a external URL

2011-12-20 Thread Pablo Díaz
Because when I try to write to response I get's this error: ERROR - DefaultExceptionMapper - Unexpected error occurred java.lang.IllegalStateException: Can't call write(CharSequence) after write(byte[]) has been called. at org.apache.wicket.protocol.http.BufferedWebResponse.write(Buffer

Re: Getting response from a external URL

2011-12-20 Thread Igor Vaynberg
why doesnt that work in wicket? -igor On Tue, Dec 20, 2011 at 12:46 AM, Pablo Díaz wrote: > Hi, > > I'm trying to do something like an internal proxy in my web-app to check > permisions to connect from my portal to a mapserver server. > > So, I'm trying to get de request from an OpenLayers and r

Getting response from a external URL

2011-12-20 Thread Pablo Díaz
Hi, I'm trying to do something like an internal proxy in my web-app to check permisions to connect from my portal to a mapserver server. So, I'm trying to get de request from an OpenLayers and redirect the connection throw my internal proxy (after check the roles) . I've done this before in