1 Reply Latest reply: Jul 12, 2011 1:13 AM by Max Rydahl Andersen RSS

JSF error page integration

Martin Kočí Newbie

Hi,

 

there is outgoing effort at myfaces to improve error reporting and handling [1].

 

As part of [2] I want to create on-click navigation from myfaces error page to source file. There are two cases:

1) java code exception / stack trace

2) facelets location (line, column)

 

use case:

- myfaces produce error page with stack trace and location of source element as you can see at screenshot at [3]

- user clicks on the line of the stack trace output -> tools open the source file at relevant line

- user clicks on the source element ("location" words in the screenshot) -> tools open  source facelet file at relevant line/column

 

 

Questions / for discussion:

- is this even doable in eclipse and its embedded browser view?

- what can jboss tools do for it?

- if it not possible to do it in embedded browse, there is still possibillity to do it from  java console view ? Stack trace output is clickable already.

- format produced with myfaces can be changed according to jbtools needs

 

 

 

[1] https://issues.apache.org/jira/browse/MYFACES-3053

[2] https://issues.apache.org/jira/browse/MYFACES-3213

[3] https://issues.apache.org/jira/secure/attachment/12485731/after-v1.png

  • 1. Re: JSF error page integration
    Max Rydahl Andersen Master

    If you ask if its easy to do then no

     

    Automatically detecting that a text string is a link is not easy/performant. We should at least have some kind of marker to look for.

    i.e. a class on a div, a custom url or javascript call we can hook into. Note, the custom javascript or url requires afaik that we open the browser and you can't just use the default embedded one since it won't have the custom listeners defined.

     

    If there is a custom div we can look for we could have a context menu in eclipse that says something like "search for JSF error" or similar that would look and then use the already existing functionallity in eclipse of highlighting console error output and java stack traces.

     

    Those things you can actually already use today - i.e. if that error comes out on the console of the server then clicking on facelets error and java stacktraces already just works.

     

    You can also open the Java Srack Trace view from the console and paste the stacktrace in there and you can do it independent on you having access to the server console.