Mr Volker Leidl,

                 I worked on the problem that you posted.
                 I feel that I have found out the cause of  the problem that you are 
facing.
                 I worked on a sample jsp file to get to the root of the problem.

                 What is happening is ? The source file
                _0002fhelp_0002fabout_0005fincl_0002ejspabout_0005fincl_jsp_2.java
                has thrown an exception at the line 71 itself (This is very much 
correct)

                When you are viewing the source file using some editor,
                a new line is shown only on occurance of '\n' character by the error 
message displayer.
                where as while displaying the line number of the error occurance, 
there is not only '\n' character
                that is treated as "new line" character but also there is some other 
character(which my editor is not
                treating it as "new line character" ) that is taken into account as a 
"new line" character.

                In my editor (I use edit Plus editor ) I could find out that this 
character was displayed as "Square pattern"

                When i added the number of occurances of this character to line number 
(as displayed by my editor)
                I got the exact line number where the exception was being thrown.

                I think this should solve your problem.

                If you still have problems in understanding this concept please reply, 
I will try of work on it
                    in a more detail way.

regards
 shanmugam k.







Volker Leidl wrote:

> Hi all!
>
> I repeatedly run into the problem that the stack trace of an exception
> thrown within a jsp page does not show the appropriate line number.
> For instance the output of the stack trace says:
>
> java.lang.Exception
>         at
> help._0002fhelp_0002fabout_0005fincl_0002ejspabout_0005fincl_jsp_2._jspServi
> ce(_0002fhelp_0002fabout_0005fincl_0002ejspabout_0005fincl_jsp_2.java:71)
>         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>
> Looking at the generated class file (which i found in a subdirectory of
> $(tomcat_home)/work) 71 is definitely not the correct line where the
> exception was thrown. In other cases the given line number even exceeds the
> end of the file.
>
> Of cource I should try to keep as much code as possible outside my jsps. But
> still this problem makes it rather annoying  to find the source of an
> exception.
>
> Thanks for you help,
>
> Volker.
>
> --
> To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to