<div dir="ltr">Thanks for the pointers. It appears i may have to extend/modify the parts where the actual requests are processed. Apart from getURL, would it be worthwhile to look into openlayers.request?</div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Sat, Dec 29, 2012 at 7:00 PM, Tue Topholm <span dir="ltr"><<a href="mailto:tt@sugee.dk" target="_blank">tt@sugee.dk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">Would he be able to get the error in onimageloaderror?<div><br></div><div><br></div><div>The other way is to extend the the geturl, with a second request, where you catch the error….</div>
<div><br><div><div>Den 29/12/2012 kl. 03.40 skrev Alessandro Ferrucci <<a href="mailto:alessandroferrucci@gmail.com" target="_blank">alessandroferrucci@gmail.com</a>>:</div><div><div class="h5"><br><blockquote type="cite">
The onImageLoadError would not allow him to program granular handlers depending on the type of application exception, just one broad error, which sounds like its not enough.<div><br></div><div>Alessandro Ferrucci.<span></span><br>

<br>On Friday, December 28, 2012, Tue Topholm  wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">What about the onImageLoadError, I don't know if it is deprecated…<br>


<br>
<br>
<br>
<br>
Den 28/12/2012 kl. 14.59 skrev pierre de fermat <<a>fermatslittletheorem@gmail.com</a>>:<br>
<br>
> It is slightly more complicated than that. For session related<br>
> exceptions, i need to show a dialogue box and redirect to login page.<br>
> For timeout errors, i can request a 'try again' message etc. There are<br>
> also lots of application logic related exceptions that I need to<br>
> handle.<br>
><br>
> Best<br>
> Pierre<br>
><br>
> On 12/28/12, Tue Topholm <<a>tt@sugee.dk</a>> wrote:<br>
>> Why not just return an image with the error in…..<br>
>> Den 28/12/2012 kl. 11.41 skrev pierre de fermat<br>
>> <<a>fermatslittletheorem@gmail.com</a>>:<br>
>><br>
>>> Thanks Tue. I managed to redirect it and it works. However, this approach<br>
>>> cannot handle exceptions. When i fake the wms call, and if the struts<br>
>>> layer encounters an exception (session related, db timeout etc) , I just<br>
>>> end up with an empty image. I am not able to redirect such a request via<br>
>>> struts.xml or any other means. The proxy method would also face similar<br>
>>> issues.<br>
>>><br>
>>> Any thoughts?<br>
>>><br>
>>> Best<br>
>>> Pierre<br>
>>><br>
>>><br>
>>> On Thu, Dec 27, 2012 at 6:06 PM, Tue Topholm <<a>tt@sugee.dk</a>> wrote:<br>
>>> That is the "normal" way to do it....<br>
>>><br>
>>> You also have the option to provide a proxy url that does exactly what you<br>
>>> want.<br>
>>><br>
>>><br>
>>> --<br>
>>><br>
>>> Med venlig hilsen / Kind regards<br>
>>><br>
>>> Tue Topholm<br>
>>> Sugee<br>
>>> Tlf: <a href="tel:%2B45%2032%2013%2032%2032" value="+4532133232" target="_blank">+45 32 13 32 32</a><br>
>>> W: <a href="http://www.sugee.dk/" target="_blank">http://www.sugee.dk</a><br>
>>><br>
>>><br>
>>> 2012/12/27 pierre de fermat <<a>fermatslittletheorem@gmail.com</a>><br>
>>> Hi<br>
>>> I am creating a web app (dojo/struts/postgres/postgis) which amongst<br>
>>> other things, need to deliver GIS capabilities.<br>
>>><br>
>>> The base infrastructure (security,logging,caching etc) is in place and<br>
>>> other modules are under development. I took up openlayers as my<br>
>>> frontend js for rendering maps from geoserver.<br>
>>><br>
>>> For other modules, the request (ajax and regular) goes through my<br>
>>> struts filter layers -> action class->dao->db route. However,<br>
>>> openlayer requires configuration of wms services URL (provided by the<br>
>>> geoserver) . I can't direct those requests directly to geoserver. I<br>
>>> need my app to trap requests do bunch of validations and then process<br>
>>> it. I am sure any app developer would have gone through the same issue<br>
>>> that i am facing right now.<br>
>>><br>
>>> i am thinking of 'tricking' openlayer by giving the URL of a struts<br>
>>> action which captures the parameters from the request URL, and then<br>
>>> requesting the geoserver internally for the response.This way i could<br>
>>> manage session, security etc and keep geoserver internally facing. Is<br>
>>> this recomendded? Is there a better way to make openlayer work with<br>
>>> external web app?<br>
>>><br>
>>> Regards<br>
>>> Pierre<br>
>>> _______________________________________________<br>
>>> Users mailing list<br>
>>> <a>Users@lists.osgeo.org</a><br>
>>> <a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
>>><br>
>>><br>
>><br>
>><br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a>Users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
</blockquote></div><br><br>-- <br>Signed,<br>Alessandro Ferrucci<br>
</blockquote></div></div></div><br></div></div></blockquote></div><br></div>