[OpenLayers-Users] openlayers,geoserver in external web app

Alessandro Ferrucci alessandroferrucci at gmail.com
Fri Dec 28 06:56:24 PST 2012


"SMS http message" should have read "WMS http message".

On Friday, December 28, 2012, Alessandro Ferrucci wrote:

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


-- 
Signed,
Alessandro Ferrucci
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20121228/a427213a/attachment.html>


More information about the Users mailing list