[mapserver-users] mapfile web object error

Steve Lime Steve.Lime at dnr.state.mn.us
Fri Nov 6 13:34:36 PST 2009


Your error HTML page is not a template, MapServer doesn't process it. Rather it just redirects
users to it. As I mentioned you can customize the URL redirected to by passing additional 
information like the error message generated by MapServer.

In your error page you'd have to use javascript or whatever to pluck that info off the query
string and display it on your page. This is totally outside MapServer. If your error page was
a PHP page you could do it there. Does that make sense?

Steve

>>> On 11/6/2009 at 2:03 PM, in message <4AF41E87.CED1.00DF.0 at wapa.gov>, "Eric
Weisbender" <Weisbend at wapa.gov> wrote:
> I think I understand, but in my error html page do I call it as a veriable 
> like ... <input type="text" name="errmsg_esc" value="[errmsg_esc]"> or <input 
> type="text" name="message" value="[message]"> or is there some other way to 
> make it show up on the error.html page?
> 
> EW
> 
>>>> "Steve Lime" <Steve.Lime at dnr.state.mn.us> 11/6/2009 11:36 AM >>>
> It's basically the text you'd see in a standard error. You have the 
> opportunity to
> wrap it in another look & feel, somehow parse it and write your own or even 
> add
> to it.
> 
> Steve
> 
>>>> On 11/6/2009 at 11:47 AM, in message <4AF3FED6.CED1.00DF.0 at wapa.gov>, "Eric
> Weisbender" <Weisbend at wapa.gov> wrote:
>> Steve,
>> 
>> This is exactly what I am looking for.  What would the html string look like 
> 
>> to display it in my error page.
>> 
>> Thanks a million.
>> EW
>> 
>>>>> "Steve Lime" <Steve.Lime at dnr.state.mn.us> 11/6/2009 10:33 AM >>>
>> There ERROR parameter has no effect in mapscript unless you choose to do so 
>> yourself. In that environment
>> you have total control over error messages.
>> 
>> The CGI is a different story. In that environment the ERROR parameter is 
>> used. It's also treated like a template
>> so you can pass the MapServer error buffer on to your default error page as 
>> an argument. For example you
>> could do something like:
>> 
>> WEB
>>   ...
>>   ERROR 'http://my.site.com/error.html?message=[errmsg_esc]'
>> END
>> 
>> and then in your page you could display the message or parse it to display a 
> 
>> custom message.
>> 
>> Is that what you're after?
>> 
>> Steve
>> 
>>>>> On 11/6/2009 at 11:08 AM, in message <4AF3F582.CED1.00DF.0 at wapa.gov>, "Eric
>> Weisbender" <Weisbend at wapa.gov> wrote:
>>> How can I include the default web error object message in my custom web 
>> error 
>>> page.  In the map file under the Web object there is a place to 
>>> redirect/create your own error page.  If you don't specify the error html 
>>> page you get the standard mapserver error.  This is in all versions of 
>>> mapserver and it doesn't matter if you are running cgi or mapscript because 
>>> it a map file web object definition.  Any help would be appreciated.
>>> 
>>> Thanks,
>>> EW
>>> 
>>> _______________________________________________
>>> mapserver-users mailing list
>>> mapserver-users at lists.osgeo.org 
>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users 




More information about the MapServer-users mailing list