Announcement

Collapse
No announcement yet.

error-page geht nicht

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • error-page geht nicht

    hallo,

    ich habe eine web anwednung und möchte, dass sobal eine java.lang.exception auftritt.ich habe versucht das ganze in der web.xml einzubauen wie folgt:

    [JAVA]

    <error-page>
    <exception-type>java.lang.Exception</exception-type>
    <location>/faces/error.jsf</location>
    </error-page>


    <error-page>
    <error-code>500</error-code>
    <location>/faces/error.jsf</location>
    </error-page>
    [/JAVA]

    beides funktioniert nicht!wenn ich einfach ein nullpointerexception auslöse wird immer der standardfehler 500 von tomct angezeigt.

    was mach ich falsch?

    danke und grüße

  • #2
    Vermutlich werden die *.jsf nicht gefunden....


    http://wiki.apache.org/myfaces/Handling_Server_Errors
    Christian

    Comment


    • #3
      hallo,

      ich verwende nicht myfaces sondern woodstock.gilt derlink fürbeide frameworks?

      grüßeund danke

      Comment


      • #4
        Another approach is described in the book 'Core Server Faces' which uses the servlet engine to catch the error and delegate to a JSF error page. While not as elegant as the first approach this method has several advantages for some users
        [1] It uses a standard JSP approach and framework
        [2] It does not require custom servlets
        [3] It can easily be customized/changed by simply changing the error handler definition in the web.xml
        Christian

        Comment


        • #5
          hallo,

          danke fürden hinweis. ich versteh es leider nicht. kannst du mir das beispiel evt. erklären oder zumindest mir die notwenigen schritte zeigen.

          danke

          Comment

          Working...
          X