I don't think this is correct. I just verified what you suggested, but my
source file does not contain any single linefeeds (or carriage returns) only
CRLF pairs. Especially all the compiled jsps contain the following line:

pageContext = _jspxFactory.getPageContext(this, request, response,
                        "", true, 8192, true);

with a single linefeed after the third parameter (followed by a view tabs).
This is definitely not from my jsp.


> -----Original Message-----
> From: Ralph Einfeldt [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, November 29, 2001 2:00 PM
> To: Tomcat Users List
> Subject: AW: Wrong line number in stack trace
>
>
> AFAIK tomcat only output those characters that are in your JSP.
> It is not introducing any line feeds on it's own.
>
> Is it possible, that the files have been edited (at least once)
> with different settings for the editor, or under linux ?
>
> > -----Ursprüngliche Nachricht-----
> > Von: Volker Leidl [mailto:[EMAIL PROTECTED]]
> > Gesendet: Donnerstag, 29. November 2001 13:52
> > An: Tomcat Users List; [EMAIL PROTECTED]
> > Betreff: RE: Wrong line number in stack trace
> >
> >
> > Thanks a lot!
> > This is exactly the problem. I also used EditPlus to view the code.
> > Switching to Unix file format in EditPlus solves the problem.
> > But obviously Tomcat compiles jsps into servlets containing
> > an inconsisten
> > line break format namely \n\r and solely \n mixed in one
> > document. I can't
> > imagine what's the use of that behaviour. For me it seems like a bug.
> >
> > Anyway, thanks for your help,
> > Volker.
> >
> > > -----Original Message-----
> > > From: Shanmugam K [mailto:[EMAIL PROTECTED]]
> > > Sent: Thursday, November 29, 2001 12:52 PM
> > > To: Tomcat Users List
> > > Subject: Re: Wrong line number in stack trace
> > >
> > >
> > > 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]>
>
>
>
> --
> 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