Display well formatted html error page; how to

I'm using Django for my backend and mostly getting XML responses to my HttpService requests.  However when I get an error on the backend, The message in the fault event is relatively useless.  To debug I have to copy the request string from the alert window and post it in a separate browser window to see the error traceback.
I'm using Django on the backend which gives a very nicely formatted error page but I cannot see that from Flex.  I would like to detect the error and open a new browser window/tab and display the "pretty" info.  Below is a snippet of what i'm doing now:
            public  function AssessmentActionServiceFaultHandler(event:FaultEvent):void {
                Alert.show("FAULT "+event.message);
and I see something like this:
getUser failed (mx.messaging.messages::ErrorMessage)#0
  body = ""
  clientId = "DirectHTTPChannel0"
  correlationId = "4451F459-39AD-F687-87A6-FCBD2AD9BC11"
  destination = ""
  extendedData = (null)
  faultCode = "Server.Error.Request"
  faultDetail = "Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: http://localhost:37813/django/mds30/app/getuser/?hostport=localhost:7777&https=N&id=4451F4 59-39AD-F687-87A6-FCBD2AD9BC11"]. URL: http://localhost:7777/django/mds30/app/getuser/"
  faultString = "HTTP request error"
  headers = (Object)#1
    DSStatusCode = 0
  messageId = "F6075BBF-2CAE-0FCC-BDB7-FCBD32C34E2B"
  rootCause = (flash.events::IOErrorEvent)#2
    bubbles = false
    cancelable = false
    currentTarget = (flash.net::URLLoader)#3
      bytesLoaded = 0
      bytesTotal = 0
      data = ""
      dataFormat = "text"
    eventPhase = 2
    target = (flash.net::URLLoader)#3
    text = "Error #2032: Stream Error. URL: http://localhost:37813/django/mds30/app/getuser/?hostport=localhost:7777&https=N&id=4451F4 59-39AD-F687-87A6-FCBD2AD9BC11"
    type = "ioError"
  timestamp = 0
  timeToLive = 0
------------------while a normal web page displays something like this----------------------------------------------
instance at /django/mds30/app/getuser/
Deprecated String Exception: 'error demo'
Request Method:
GET
Request URL:
http://localhost:7777/django/mds30/app/getuser/
Django Version:
1.2.1
Exception Type:
instance
Exception Value:
Deprecated String Exception: 'error demo'
Exception Location:
C:\all\projects\AccMDS30Server\mds30\app\views.py in getuser,  line 87
Python Executable:
c:\alltools\python\python.exe
Python Version:
2.4.0
Python Path:
['C:\\all\\projects\\AccMDS30Server\\mds30',  'c:\\alltools\\python\\lib\\site-packages\\mysql_python-1.2.2-py2.4-win32.egg',  'c:\\alltools\\python\\lib\\site-packages\\fdfgen-0.9.1-py2.4.egg',  'C:\\all\\projects\\AccMDS30Server',  'C:\\all\\projects\\AccMDS30Server\\mds30', 'c:\\alltools\\python',  'c:\\alltools\\python\\DLLs', 'c:\\alltools\\python\\lib',  'c:\\alltools\\python\\lib\\lib-tk',  'c:\\alltools\\python\\lib\\plat-win',  'c:\\alltools\\python\\lib\\site-packages',  'C:\\Windows\\system32\\python24.zip', 'C:\\alltools\\eclipse with  PyDev']
Server time:
Fri, 10 Sep 2010 13:44:06 -0400
Traceback Switch to copy-and-paste view
c:\alltools\python\Lib\site-packages\django\core\handlers\base.py in get_response
# Apply view middleware
for  middleware_method in self._view_middleware:
response = middleware_method(request, callback, callback_args,  callback_kwargs)
if response:
return response
try:
response = callback(request, *callback_args, **callback_kwargs) ...
except  Exception, e:
# If the view raised an exception, run it through  exception
# middleware, and if the exception middleware returns a
#  response, use that. Otherwise, reraise the exception.
for  middleware_method in self._exception_middleware:
response = middleware_method(request, e)
▶ Local vars
Variable Value
callback
<function getuser at  0x033C69F0>
callback_args
callback_kwargs
exc_info
('error demo', None,  <traceback object at 0x033C0918>)
exceptions
<module  'django.core.exceptions' from  'c:\alltools\python\lib\site-packages\django\core\exceptions.pyc'>
middleware_method
<bound method  MessageMiddleware.process_request of  <django.contrib.messages.middleware.MessageMiddleware object at  0x031ED210>>
receivers
[(<function  _rollback_on_exception at 0x028EFB70>, None)]
request
<WSGIRequest GET:<QueryDict: {}>, POST:<QueryDict: {}>, COOKIES:{'sessionid': '352717811d57a59ad433e3d1e5f4f1d6'}, META:{'ALLUSERSPROFILE': 'C:\\ProgramData',  'APPDATA': 'C:\\Users\\frsells.ADVENTISTCARE\\AppData\\Roaming',  'COMMONPROGRAMFILES': 'C:\\Program Files (x86)\\Common Files',  'COMMONPROGRAMFILES(X86)': 'C:\\Program Files (x86)\\Common Files',  'COMMONPROGRAMW6432': 'C:\\Program Files\\Common Files',  'COMPUTERNAME': 'NB-FRSELLS',  'COMSPEC': 'C:\\Windows\\system32\\cmd.exe',  'CONTENT_LENGTH': '',  'CONTENT_TYPE': 'text/plain',  'CVSROOT': ':pserver:[email protected]:/cvs',  'DJANGO_SETTINGS_MODULE': 'mds30.settings',  'FP_NO_HOST_CHECK': 'NO',  'GATEWAY_INTERFACE': 'CGI/1.1',  'HOMEDRIVE': 'C:',  'HOMEPATH': '\\Users\\frsells.ADVENTISTCARE',  'HTTP_ACCEPT':  'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',  'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',  'HTTP_ACCEPT_ENCODING': 'gzip,deflate',  'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5',  'HTTP_CACHE_CONTROL': 'max-age=0',  'HTTP_CONNECTION': 'keep-alive',  'HTTP_COOKIE': 'sessionid=352717811d57a59ad433e3d1e5f4f1d6',  'HTTP_HOST': 'localhost:7777',  'HTTP_KEEP_ALIVE': '115',  'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US;  rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6',  'JAVA_HOME': 'c:\\alltools\\jdk5',  'LOCALAPPDATA': 'C:\\Users\\frsells.ADVENTISTCARE\\AppData\\Local',  'LOGONSERVER': '\\\\ACCVDC03',  'NUMBER_OF_PROCESSORS': '4',  'OS': 'Windows_NT',  'PATH':  'c:/alltools/jdk5/bin/../jre/bin/client;c:/alltools/jdk5/bin/../jre/bin;C:\\Program  Files  (x86)\\NetworkSimplicity\\ssh;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wb em;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program  Files\\Intel\\DMIX;C:\\Program Files (x86)\\NTRU Cryptosystems\\NTRU  TCG Software Stack\\bin\\;C:\\Program Files\\NTRU Cryptosystems\\NTRU  TCG Software Stack\\bin\\;C:\\Program Files\\Wave Systems  Corp\\Gemalto\\Access Client\\v5\\;C:\\Program Files (x86)\\Common  Files\\Roxio Shared\\DLLShared\\;C:\\Program Files (x86)\\Common  Files\\Roxio  Shared\\10.0\\DLLShared\\;c:\\alltools\\jdk5\\bin;c:\\alltools\\python;c:\\alltools\\pyth on\\scripts;c:\\alltools\\ant;c:\\alltools\\bin;C:\\Program  Files\\MySQL\\MySQL Server  5.0\\bin;C:\\all\\scripts;C:\\alltools\\ant\\bin',  'PATHEXT': '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC',  'PATH_INFO': u'/django/mds30/app/getuser/',  'PROCESSOR_ARCHITECTURE': 'x86',  'PROCESSOR_ARCHITEW6432': 'AMD64',  'PROCESSOR_IDENTIFIER': 'Intel64 Family 6 Model 23 Stepping 10,  GenuineIntel',  'PROCESSOR_LEVEL': '6',  'PROCESSOR_REVISION': '170a',  'PROGRAMDATA': 'C:\\ProgramData',  'PROGRAMFILES': 'C:\\Program Files (x86)',  'PROGRAMFILES(X86)': 'C:\\Program Files (x86)',  'PROGRAMW6432': 'C:\\Program Files',  'PROMPT': '$P$G',  'PSMODULEPATH':  'C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules\\',  'PUBLIC': 'C:\\Users\\Public',  'PYDEV_COMPLETER_PYTHONPATH': 'C:\\alltools\\eclipse with  PyDev\\plugins\\org.python.pydev_1.6.1.2010080312\\PySrc',  'PYDEV_CONSOLE_ENCODING': 'Cp1252',  'PYTHONIOENCODING': 'Cp1252',  'PYTHONPATH': 'C:\\alltools\\eclipse with  PyDev\\plugins\\org.python.pydev_1.6.1.2010080312\\PySrc\\pydev_sitecustomize;C:\\all\\pr ojects\\AccMDS30Server;C:\\all\\projects\\AccMDS30Server\\mds30;c:\\alltools\\python;c:\\a lltools\\python\\DLLs;c:\\alltools\\python\\lib;c:\\alltools\\python\\lib\\lib-tk;c:\\allt ools\\python\\lib\\plat-win;c:\\alltools\\python\\lib\\site-packages',   'QUERY_STRING': '',  'REMOTE_ADDR': '127.0.0.1',  'REMOTE_HOST': '',  'REQUEST_METHOD': 'GET',  'ROXIOCENTRAL': 'C:\\Program Files (x86)\\Common Files\\Roxio  Shared\\10.0\\Roxio Central36\\',  'RUN_MAIN': 'true',  'SCRIPT_NAME': u'',  'SERVER_NAME': 'NB-FRSELLS.adventistcare.net',  'SERVER_PORT': '7777',  'SERVER_PROTOCOL': 'HTTP/1.1',  'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.4',  'SESSIONNAME': 'Console',  'SYSTEMDRIVE': 'C:',  'SYSTEMROOT': 'C:\\Windows',  'TEMP': 'C:\\Users\\FRSELL~1.ADV\\AppData\\Local\\Temp',  'TMP': 'C:\\Users\\FRSELL~1.ADV\\AppData\\Local\\Temp',  'USERDNSDOMAIN': 'ADVENTISTCARE.NET',  'USERDOMAIN': 'ADVENTISTCARE',  'USERNAME': 'frsells',  'USERPROFILE': 'C:\\Users\\frsells.ADVENTISTCARE',  'VS100COMNTOOLS': 'C:\\Program Files (x86)\\Microsoft Visual Studio  10.0\\Common7\\Tools\\',  'WINDIR': 'C:\\Windows',  'wsgi.errors': <open file '<stderr>', mode 'w' at  0x0037E0B0>,  'wsgi.file_wrapper': <class  'django.core.servers.basehttp.FileWrapper'>,  'wsgi.input': <socket._fileobject object at 0x02A8ECE0>,  'wsgi.multiprocess': False,  'wsgi.multithread': True,  'wsgi.run_once': False,  'wsgi.url_scheme': 'http',  'wsgi.version': (1, 0)}>
resolver
<RegexURLResolver  mds30.urls (None:None) ^/>
response
None
self
<django.core.handlers.wsgi.WSGIHandler  object at 0x028C7590>
settings
<django.conf.LazySettings  object at 0x024F6710>
urlconf
'mds30.urls'
urlresolvers
<module  'django.core.urlresolvers' from  'c:\alltools\python\lib\site-packages\django\core\urlresolvers.pyc'>
C:\all\projects\AccMDS30Server\mds30\app\views.py in getuser
temp += '<p>GET.META["REMOTE_ADDR"]=' +  str(request.META['REMOTE_ADDR'])
#temp += '<p>GET.META["USERNAME"]=' +  str(request.META['USERNAME'])
#temp += '<p>GET.META["SESSIONNAME"]=' +  str(request.META['SESSIONNAME'])
temp += '<p>GET.META=' + str(request.META)
return  HttpResponse("Hello, You are using the MDS 3.0 web service from %s" %  temp)
def getuser(request,  *args, **kwargs):
raise 'error demo' ...
sessionid =  getACCSessionId(request)
user = security.getUser(sessionid)
if user==None:
values =  {'Error':sessionid, 'user':str(user)}
else:
values =  user.__dict__.copy()
▶ Local vars
Variable Value
args
kwargs
request
<WSGIRequest GET:<QueryDict: {}>, POST:<QueryDict: {}>, COOKIES:{'sessionid': '352717811d57a59ad433e3d1e5f4f1d6'}, META:{'ALLUSERSPROFILE': 'C:\\ProgramData',  'APPDATA': 'C:\\Users\\frsells.ADVENTISTCARE\\AppData\\Roaming',  'COMMONPROGRAMFILES': 'C:\\Program Files (x86)\\Common Files',  'COMMONPROGRAMFILES(X86)': 'C:\\Program Files (x86)\\Common Files',  'COMMONPROGRAMW6432': 'C:\\Program Files\\Common Files',  'COMPUTERNAME': 'NB-FRSELLS',  'COMSPEC': 'C:\\Windows\\system32\\cmd.exe',  'CONTENT_LENGTH': '',  'CONTENT_TYPE': 'text/plain',  'CVSROOT': ':pserver:[email protected]:/cvs',  'DJANGO_SETTINGS_MODULE': 'mds30.settings',  'FP_NO_HOST_CHECK': 'NO',  'GATEWAY_INTERFACE': 'CGI/1.1',  'HOMEDRIVE': 'C:',  'HOMEPATH': '\\Users\\frsells.ADVENTISTCARE',  'HTTP_ACCEPT':  'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',  'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',  'HTTP_ACCEPT_ENCODING': 'gzip,deflate',  'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5',  'HTTP_CACHE_CONTROL': 'max-age=0',  'HTTP_CONNECTION': 'keep-alive',  'HTTP_COOKIE': 'sessionid=352717811d57a59ad433e3d1e5f4f1d6',  'HTTP_HOST': 'localhost:7777',  'HTTP_KEEP_ALIVE': '115',  'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US;  rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6',  'JAVA_HOME': 'c:\\alltools\\jdk5',  'LOCALAPPDATA': 'C:\\Users\\frsells.ADVENTISTCARE\\AppData\\Local',  'LOGONSERVER': '\\\\ACCVDC03',  'NUMBER_OF_PROCESSORS': '4',  'OS': 'Windows_NT',  'PATH':  'c:/alltools/jdk5/bin/../jre/bin/client;c:/alltools/jdk5/bin/../jre/bin;C:\\Program  Files  (x86)\\NetworkSimplicity\\ssh;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wb em;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program  Files\\Intel\\DMIX;C:\\Program Files (x86)\\NTRU Cryptosystems\\NTRU  TCG Software Stack\\bin\\;C:\\Program Files\\NTRU Cryptosystems\\NTRU  TCG Software Stack\\bin\\;C:\\Program Files\\Wave Systems  Corp\\Gemalto\\Access Client\\v5\\;C:\\Program Files (x86)\\Common  Files\\Roxio Shared\\DLLShared\\;C:\\Program Files (x86)\\Common  Files\\Roxio  Shared\\10.0\\DLLShared\\;c:\\alltools\\jdk5\\bin;c:\\alltools\\python;c:\\alltools\\pyth on\\scripts;c:\\alltools\\ant;c:\\alltools\\bin;C:\\Program  Files\\MySQL\\MySQL Server  5.0\\bin;C:\\all\\scripts;C:\\alltools\\ant\\bin',  'PATHEXT': '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC',  'PATH_INFO': u'/django/mds30/app/getuser/',  'PROCESSOR_ARCHITECTURE': 'x86',  'PROCESSOR_ARCHITEW6432': 'AMD64',  'PROCESSOR_IDENTIFIER': 'Intel64 Family 6 Model 23 Stepping 10,  GenuineIntel',  'PROCESSOR_LEVEL': '6',  'PROCESSOR_REVISION': '170a',  'PROGRAMDATA': 'C:\\ProgramData',  'PROGRAMFILES': 'C:\\Program Files (x86)',  'PROGRAMFILES(X86)': 'C:\\Program Files (x86)',  'PROGRAMW6432': 'C:\\Program Files',  'PROMPT': '$P$G',  'PSMODULEPATH':  'C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules\\',  'PUBLIC': 'C:\\Users\\Public',  'PYDEV_COMPLETER_PYTHONPATH': 'C:\\alltools\\eclipse with  PyDev\\plugins\\org.python.pydev_1.6.1.2010080312\\PySrc',  'PYDEV_CONSOLE_ENCODING': 'Cp1252',  'PYTHONIOENCODING': 'Cp1252',  'PYTHONPATH': 'C:\\alltools\\eclipse with  PyDev\\plugins\\org.python.pydev_1.6.1.2010080312\\PySrc\\pydev_sitecustomize;C:\\all\\pr ojects\\AccMDS30Server;C:\\all\\projects\\AccMDS30Server\\mds30;c:\\alltools\\python;c:\\a lltools\\python\\DLLs;c:\\alltools\\python\\lib;c:\\alltools\\python\\lib\\lib-tk;c:\\allt ools\\python\\lib\\plat-win;c:\\alltools\\python\\lib\\site-packages',   'QUERY_STRING': '',  'REMOTE_ADDR': '127.0.0.1',  'REMOTE_HOST': '',  'REQUEST_METHOD': 'GET',  'ROXIOCENTRAL': 'C:\\Program Files (x86)\\Common Files\\Roxio  Shared\\10.0\\Roxio Central36\\',  'RUN_MAIN': 'true',  'SCRIPT_NAME': u'',  'SERVER_NAME': 'NB-FRSELLS.adventistcare.net',  'SERVER_PORT': '7777',  'SERVER_PROTOCOL': 'HTTP/1.1',  'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.4',  'SESSIONNAME': 'Console',  'SYSTEMDRIVE': 'C:',  'SYSTEMROOT': 'C:\\Windows',  'TEMP': 'C:\\Users\\FRSELL~1.ADV\\AppData\\Local\\Temp',  'TMP': 'C:\\Users\\FRSELL~1.ADV\\AppData\\Local\\Temp',  'USERDNSDOMAIN': 'ADVENTISTCARE.NET',  'USERDOMAIN': 'ADVENTISTCARE',  'USERNAME': 'frsells',  'USERPROFILE': 'C:\\Users\\frsells.ADVENTISTCARE',  'VS100COMNTOOLS': 'C:\\Program Files (x86)\\Microsoft Visual Studio  10.0\\Common7\\Tools\\',  'WINDIR': 'C:\\Windows',  'wsgi.errors': <open file '<stderr>', mode 'w' at  0x0037E0B0>,  'wsgi.file_wrapper': <class  'django.core.servers.basehttp.FileWrapper'>,  'wsgi.input': <socket._fileobject object at 0x02A8ECE0>,  'wsgi.multiprocess': False,  'wsgi.multithread': True,  'wsgi.run_once': False,  'wsgi.url_scheme': 'http',  'wsgi.version': (1, 0)}>
Environment:  Request  Method: GET Request URL: http://localhost:7777/django/mds30/app/getuser/ Django Version: 1.2.1 Python Version: 2.4.0 Installed Applications: ['django.contrib.contenttypes',  'django.contrib.sessions',  'django.contrib.sites',  'django.contrib.messages',  'mds30.app'] Installed Middleware: ('django.middleware.common.CommonMiddleware',  'django.contrib.sessions.middleware.SessionMiddleware',  'django.contrib.messages.middleware.MessageMiddleware')   Traceback: File "c:\alltools\python\Lib\site-packages\django\core\handlers\base.py"  in get_response   100.                     response = callback(request, *callback_args,  **callback_kwargs) File "C:\all\projects\AccMDS30Server\mds30\app\views.py" in getuser   87.     raise 'error demo'  Exception Type: instance at /django/mds30/app/getuser/ Exception Value: Deprecated String Exception: 'error demo'  
Request information
GET
No GET data
POST
No POST data
FILES
No FILES data
COOKIES
Variable Value
sessionid
'352717811d57a59ad433e3d1e5f4f1d6'
META

I came up with an ugly solution.  I save the last url and then resend it if a fault is detected.  probably not a good thing in production, but I'm still developing.  here's the code
    public  function AssessmentActionServiceFaultHandler(event:FaultEvent):void {
                Globals.log("command FAILED "+event.message);   
                Globals.hideBusyDialog();
                //Alert.show("FAULT "+event.message);
                navigateToURL(new URLRequest( LastURL), "_blank" );

Similar Messages

  • He, adobe premiere cinemadng format import error!  How can I fix

    He, adobe premiere cinemadng format import error!  How can I fix

    See here:
    Unable to import DNG files : Adobe Premiere Pro

  • How to display ECID in an error page

    Hello everyone,
    I have a very simple servlet-based application that I am deploying to Oracle Fusion Middleware (version 11.1.1.4). I also have an error page directive in my web.xml that displays a user-friendly page (i.e. "call the helpdesk") when my servlet sends HTTP 400/500 responses (which I do intentionally on certain error conditions).
    In order to help in diagnosis of the problems, I'd like to include something in the error page that the user could quote to the help desk to assist them in finding the specific log messages (which my servlet has duly logged) related to the request. The obvious thing to use would be the ECID of the request. However, I cannot, after looking through lots of documentation, figure out how to display the ECID in the error page. As my request is going through WebCache, I've tried turning on the diagnostics from the webcache (which the docs seem to say will cause the information to be included in either the response headers or the HTML body), but this doesn't seem to work.
    I appreciate any pointers, especially pointers to the docs!
    Thanks,
    John

    Looks like another option might be to make an API call like this in your JSP or Java code:
            <%= weblogic.diagnostics.context.DiagnosticContextHelper.getContextId() %>In order for this to work, I had to have a WLDF System Module targeted at the Server AND the Instrumentation checkbox had to be enabled.
    It returns null if you don't have WLDF configured or instrumentation enabled and gives a value like this if you have it enabled:
    7673164398dde610:249290ac:13091aea873:-7fff-000000000000000dFound it here:
    http://download.oracle.com/docs/cd/E21764_01/web.1111/e13714/config_prog_intro.htm#i1072698

  • Handle exception on server side and display a customized jsp error page

    Hi,
    I am developing a java/j2EE web application using servlet, jsp, ejb3 with JBOSS and ECLIPSE.
    Two cases can occur on the server side :
    1) either I have not an expected result in a method and in this case I want to display an error page (a JSP page I suppose) with a personnalized error message
    2) or I have an exception thrown and I want to display the exception message in the former JSP page
    I don't know how to cope with this problem of personnalized error message (or the message of a thrown exception) with a JSP page.
    Does anybody can help me ? Thank you
    Edited by: xflamant on Jun 20, 2009 10:51 AM

    For the case of an unknown Error, simply use a default error page.
    The redirection to this page can be accomplished by inserting folowing code into your web.xml:
         <error-page>
            <exception-type>java.lang.Throwable</exception-type>
            <location>/WEB-INF/jsp/error.jsp</location>       
        </error-page>Known exception can be caught via a try-catch block.
    Then simply dispatch to the page you want displayed an add an attribute containing the error message to the response object.
    This attribute can then be used in the target page to diplay the error.

  • Custom UCM Error Page how to take referral URL

    Hi all,
    I am creating a custom error page and I was wondering is there a way to take
    the url that throw the error.
    Example:
    While looking at http://my_site.com/sectionA/
    you follow link leading to http://my_site.com/sectionB/
    Unfortunately http://my_site.com/sectionB/ does not exist
    and you are redirected to my error page http://my_site.com/errorPage/
    Is there a way when I am on http://my_site.com/errorPage/ to know that
    it was that throw the error http://my_site.com/sectionB/
    thanks in advance,
    eng. Ilian Iliev

    Is this site studio?
    Go to the url that was bad, get redirected to your custom error section, then in the url add ?IsJava=1 and press enter. This returns the data that is behind the page.
    One of the variables I see is named originalSiteRelativeUrl and it appears to contain information you're looking for.
    Give that a try and let us know!

  • Display Pre-Formatted HTML via Web Dynpro

    Hi,
    Does anyone know of a way to display preformatted HTML via web dynpro, can any of the standard UI elements do this?
    Thanks in advance,
    Simon

    Hi,
    can you explain what do you mean by HTML string? is it binary data that you have?
    if it is a binary data i.e. in bytes then you can do this way also..
    Store the binary data in a context varaible named Data and to store the url to be generated, create another context variable Url;
    String formattedStr = wdContext.currentContextElement()
        .getData();
    try
      IWDCachedWebResource resource = WDWebResource.getWebResource
        formattedStr.getBytes("UTF-8"),
        WDWebResourceType.HTML
      resource.setResourceName("<Give a filename>");
      resource.setAttachement( false );
      resource.setReadOnce( false );
      wdContext.currentContextElement().setUrl
         resource.getAbsoluteURL()
    catch (Exception ex)
      wdComponentAPI.getMessageManager()
        .reportException( ex.getMessage, false );
    Set source of the Iframe as context variable Url.
    regards,
    Mahesh

  • [Forms9i] Display error page

    Hello,
    How can i do to display my own html error page to user when Forms Sercice is not avalaible ?

    Hello,
    How can i do to display my own html error page to user when Forms Sercice is not avalaible ?

  • How to configure custom error page in WebServer 6.1 if instance is down

    Hi ,
    I have deployed an application on port 82.
    If the instance is down, want to configure custom error page in Sun One Webserver 6.1 so that the it displays a customised message rather than browser displaying its custom DNS error page.
    In web.xml, configured the 404/500 error messages, but if the instance is down, my web application does not receive the request. So it should be defined at the root level.Where to configure the same?
    Thanks for the help in advance.

    You can use Error function "send-error" http://docs.sun.com/source/817-1834-10/crobjsaf.html#wp20007
    It has an example
    Error fn=send-error code=401 path=/sun/server61/docs/errors/401.html

  • Problem with displaying XML Content well formatted.

    Hi all,
    I am developing a website which have one functionality to display XML content which is received from some other party.
    I am using TextArea for displaying this XML content on my webpage. As this XML content is not at all formatted it looks very ugly for a human to read.
    I want this XML content to be displayed well formatted, As Mozilla Firefox display it hierarchically and well formatted.
    Kindly give some suggestion for displaying XML well formatted on a webpage.
    Any comments from you people will help me.
    Thanks
    typurohit.

    The following link is a XML-based document. An XSL stylesheet transforms the XML document to HTML in the web browser. Feel free to grab a copy of the stylesheet to use as a guide.
    http://www.masonicartbook.com/production.htm
    Good luck!

  • How to send errors to a particular error page

    I want to redirect any error to a particualr error page.
    how can this be done
    thanks
    varsha

    try this out to send yur own error....
    <%@ page errorPage="error.jsp" %>
    if (true){
    throw new Exception("my error");
    the <= exception.getMessage() %> in your error page will display the error

  • Redirect to a custom error page when Forms Server shuts down

    Hi,
    I want the forms application to redirect to a custom error page whenever Forms Server goes down. (like network issues, unscheduled shutdown...) Whenever this happens, the user gets a pop up with FRM messages and user has to acknowledge the pop up. Since the application is used in the shop floor, there will not be any user always in front of the screen and will be a very big issue as there are at least 70-80 PC's on the floor which will be attended fewer times(only when there is issue with the machine) other wise the application displays important events of the machine,etc.,
    I am trying to develop a simple HTML error page(may be with applet) which will keep querying the forms server and once the forms server is up and running, the error page will revert back to the application which the user was working earlier to shutdown. Other option is the redirect to main menu of the application (this may be a PSP or a JSP or a Oracle Forms Menu ).
    Is there any event in forms to capture the loss of connection to forms server ??
    BTW, I am using Oracle Application Server 10g Forms and Reports on Windows 2000 Server...
    Any ideas...
    Thanks in advance
    Purush

    I don't think it will be easily possible in Forms for a couple of reasons.
    1. In Forms you do not have query rights, and as soon as you want to edit data, you have to log in. In Forms you log in once, and this sets your rights for the whole session. You will have to do some programming in Forms to achieve what you want. E.g. as soon as you hit the Save button you are asked for a username and password.
    2. A refresh cannot be done in Forms. Remember that Forms is a Java applet. The URL in the browser is just pointing to the startup page only. If you refresh your screen, you are taken back to the login screen of Forms again.
    Well, there will probably be ways around these problems. I'm thinking in the line of calling every form in a separate URL instead of starting a Forms application where one form is called from another form. The default 'query only' form can be called from a startup html page. This page can be refreshed. As soon as the user wants to update data, he clicks on a link or button and is taken to a login form.
    If the refresh is unsuccessful you are taken to a custom error page, like in your ASP application.
    A problem with an automatich refresh may be hanging sessions. Forms server does not always kill sessions.
    And also, how would you avoid a refresh if a user is currently using the form?

  • Error Page for PL/SQL module

    I would like to display static html eror page if Oracle Database returns error (for example cannot find procedure).
    In OAS it can be found in Applications -> Cartridges -> PL/SQL Prameters -> HTML error page.
    Where have I configure it in IAS?
    TIA, Gints

    Thanks, but it didn't help.
    The problem is that if I request URL
    http://myserver:7777/pls/mantaowner/NotExistingProcedure
    I get such a big unwanted page&info
    Thu, 8 Mar 2001 13:59:11 GMT
    bla bla all ORACLE errors
    NotExistingProcedure: PROCEDURE DOESN'T EXIST
    DAD name: mantaowner
    PROCEDURE : NotExistingProcedure
    URL : http://myserver:7777/pls/mantaowner/NotExistingProcedure
    PARAMETERS :
    ===========
    ENVIRONMENT:
    ============
    bla bla all environment
    The same problem is with URL http://myserver:7777/pls/NotExistingDAD
    How Can I get rid of all this info?
    TIA, Gints

  • Handling faults -- error pages

    We have a web service that, when run under local OC4J, returns the following
    <soapenv:Fault>
    <faultcode>Client</faultcode>
    <faultstring>Invalid parameter</faultstring>
    <detail>
    <string>
    <errorcode>E_InvalidParameter</errorcode>
    <description>&lt;GetFacilityByStateIdASDFASDF&amp;gt; is not a valid query name.</description>
    </string>
    </detail>
    </soapenv:Fault>
    But when we run the same thing on 9iAS 9.0.2, we get the following, with our own baseline HTML error page included:
    <soapenv:Fault>
    <faultcode xmlns:ns1="http://xml.apache.org/axis/">
    ns1:HTTP</faultcode>
    <faultstring>(502)Bad Gateway</faultstring>
    <detail>
    <string>return code: 502
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
    <HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=iso-8859-1"><META NAME="GENERATOR" Content="Microsoft FrontPage 4.0">
    <TITLE>DNR Information Alert</TITLE></HEAD>
    <BODY TEXT="black" BGCOLOR="white"><P><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="620" height="348">
    <TR ALIGN="LEFT" VALIGN="TOP"><TD WIDTH="570" HEIGHT="135" ALIGN="LEFT" VALIGN="TOP" colspan="2"><map name="PortalHome"><area shape="rect" coords="20,13,93,87" href="http://www.wisconsin.gov/state/home"></map><IMG src="headerandlogo.gif" usemap="#PortalHome" border="0"> </TD><TR ALIGN="LEFT" VALIGN="TOP"><TD WIDTH="121" HEIGHT="213" ALIGN="LEFT" VALIGN="TOP"><P></TD><TD WIDTH="500" HEIGHT="213" ALIGN="LEFT" VALIGN="TOP"> <P> </P><P ALIGN="CENTER"><FONT SIZE="5">Dept. of Natural Resources Information Alert<BR></FONT></P> <TABLE BORDER="0" WIDTH="108%"><TR><TD WIDTH="25%"> <b>Status:</b></TD><TD WIDTH="75%">502 Bad Gateway</TD>
    </TR><TR><D WIDTH="25%"><b>Description:</b></TD>
    <TD WIDTH="75%">The origin web server encountered an unexpected condition which prevented it from fulfilling the request. Please try your request again.</TD></TR>
    </TABLE></TABLE></BODY></HTML>
    </string>
    </detail>
    </soapenv:Fault>
    My question is where in the OC4J or Apache configuration this translation is requested, and how we get rid of it for anything with the right url for our web services.
    -- jim

    We have a web service that, when run under local OC4J, returns the following
    <soapenv:Fault>
    <faultcode>Client</faultcode>
    <faultstring>Invalid parameter</faultstring>
    <detail>
    <string>
    <errorcode>E_InvalidParameter</errorcode>
    <description>&lt;GetFacilityByStateIdASDFASDF&amp;gt; is not a valid query name.</description>
    </string>
    </detail>
    </soapenv:Fault>
    But when we run the same thing on 9iAS 9.0.2, we get the following, with our own baseline HTML error page included:
    <soapenv:Fault>
    <faultcode xmlns:ns1="http://xml.apache.org/axis/">
    ns1:HTTP</faultcode>
    <faultstring>(502)Bad Gateway</faultstring>
    <detail>
    <string>return code: 502
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
    <HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=iso-8859-1"><META NAME="GENERATOR" Content="Microsoft FrontPage 4.0">
    <TITLE>DNR Information Alert</TITLE></HEAD>
    <BODY TEXT="black" BGCOLOR="white"><P><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="620" height="348">
    <TR ALIGN="LEFT" VALIGN="TOP"><TD WIDTH="570" HEIGHT="135" ALIGN="LEFT" VALIGN="TOP" colspan="2"><map name="PortalHome"><area shape="rect" coords="20,13,93,87" href="http://www.wisconsin.gov/state/home"></map><IMG src="headerandlogo.gif" usemap="#PortalHome" border="0"> </TD><TR ALIGN="LEFT" VALIGN="TOP"><TD WIDTH="121" HEIGHT="213" ALIGN="LEFT" VALIGN="TOP"><P></TD><TD WIDTH="500" HEIGHT="213" ALIGN="LEFT" VALIGN="TOP"> <P> </P><P ALIGN="CENTER"><FONT SIZE="5">Dept. of Natural Resources Information Alert<BR></FONT></P> <TABLE BORDER="0" WIDTH="108%"><TR><TD WIDTH="25%"> <b>Status:</b></TD><TD WIDTH="75%">502 Bad Gateway</TD>
    </TR><TR><D WIDTH="25%"><b>Description:</b></TD>
    <TD WIDTH="75%">The origin web server encountered an unexpected condition which prevented it from fulfilling the request. Please try your request again.</TD></TR>
    </TABLE></TABLE></BODY></HTML>
    </string>
    </detail>
    </soapenv:Fault>
    My question is where in the OC4J or Apache configuration this translation is requested, and how we get rid of it for anything with the right url for our web services.
    -- jim

  • Customizing 400 and 500 error pages

    Hello,
    We are using default 404 and 500 error pages, how can I customize these error pages?
    I have changed the default error page under global settings, however it is still not showing the error page which I have changed?
    Could someone help in this regard.
    Thanks in advance
    Message was edited by:
    419365

    Normally those are page not found errors.
    I got the steps from metalink. See below.
    Subject: Changing the default error pages
    Hi,
    Steps mentioned below are used to have customize error message page for http 404 error,you can find out error no. for 'internal server error' and apply same steps.
    1.Create an HTML file (Say test.html) as per your requirement and place it in
    application_home\Apache\Apache\htdocs folder.
    2.Edit the HTTPD.conf file and Uncomment the Local redirects as follows
    # 2) local redirects
    ErrorDocument 404 /test.html
    Save it.
    3. Restart the HTTP server.
    ********

  • HTML error message

    I'm creating a simple web server. It works fine. When I open Firefox and connect and try to upload a file that doesn't exist, the program crashes. How do I get it direct to an HTML error page and continue running instead of crashing?

    How are you even writing this program? Have you ever written a program before? What is the purpose of this server -- why not just set up an existing server?
    You're asking very broad question. It's not like I can show you a single line of code that handles it all for you.
    In any event, read the exceptions you got. They provide helpful information. If you don't understand the message, then post it here (cut and paste it completely -- don't paraphrase it) and ask about the part that confuses you.

Maybe you are looking for

  • Cannot install SDK 1.4 on Suse Linux 8.0

    When I want to install the SDK 1.4 on Suse Linux 8.0 comes the error "bad interpreter, keine Berechtigung". I typed in a console window "./j2sdk.... .bin". I tryed both versions, the rpm and the tar shell script and also as root.

  • Bug in SQL Developer Version 1.5.1

    I have a problem with the Database Export : The generated Insert-Command look's like: INSERT INTO atable (Field1, Field2) VALUES (10.'test'); The Value-Separator is a point and not a comma. Is it a bug or have I chance to change the separator-paramet

  • How do turn on siri for an iPad 2 iOS 8.2

    How do you install Siri for iPad 2 iOS8.2 Model A1395 A5 processor.

  • Since upgrading to Lion, movies won't play in PPT for Mac 2011. ideas?

    Since upgrading to Lion, my movies will not play within PPT for Mac 2011.  Do I have to install new CODECs?  how?

  • Can`t update Iphone 4s

    Hello! Tried to update my iphone 4s to 5.0.1 and got the message like : "Unable to restore file on Iphone because of incompatibility firmware file" (Translated from Russian "Не удалось восстановить файл на Iphone из-за несовместимости файла прошивки"