Some environements are smart enough to show jsp line numbers as opposed to
translated servlet line numbers.

To answer the original question:
If you want line numbers, the best bet is use the getStackTrace() method that
all Exceptions have.  If the JVM knows line numbers it will be in the stack
trace.  If it doesn't, that is usually indictive of the line numbers being
trashed because of a JIT complier.  Disable JIT, and rerun and you should get
line numbers.

mark

Mark R Mascolino
The Procter & Gamble Co.
[EMAIL PROTECTED]



 Internet Mail Message
 Received from host:




                         Satyanarayan Divakar
          <[EMAIL PROTECTED]>                To:  
[EMAIL PROTECTED]
                                   Sent by: A        cc:     (bcc: Mark 
Mascolino-MR/PGI)
               mailing list about Java Server        Subject:     Re: [JSP-INTEREST] 
line number Exception
            Pages specification and reference
                  <[EMAIL PROTECTED]>

                            04/25/01 03:15 PM
             Please respond to A mailing list
                      about Java Server Pages
                  specification and reference






if you are talking about the line number of JSP then the line number
mentioned in the exception will always be of the servlet that is generated
i,e if it is a runtime exception. the exception thrown will alwya mention
the line number. But that can also refer to some of the standard packeges u
will have imported in to ur JSP.

-----Original Message-----
From: Alireza Nahavandi [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 25, 2001 2:09 PM
To: [EMAIL PROTECTED]
Subject: line number Exception


Hi all,
Is there any way to get the line number in which the exception has happened,
we don't want to print it, the goal is to get the line number and pass it to
an email.

Thank you,

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to