RE: Knowing the line when the error happen
That's the answer, Patrick !!! Thank you very much. -Message d'origine- De : Patrick Thomas [mailto:[EMAIL PROTECTED] Envoyé : Jueves, 11 de Agosto de 2005 07:56 p.m. À : Tomcat Users List Objet : Re: Knowing the line when the error happen Ah. Looks like I answered the wrong question. It's a two step process to make a servlet from a .jsp file: first is translate it (make a .jsp into a .java), the next is compile it. When the jsp is made into a servlet it gets all of the stuff added to it that makes it into a real java file ("public final class extends org.apache.jasper.runtime.HttpJspBase implements org.apache.jasper.runtime.JspSourceDependent" etc etc). The newly created file is placed into a the work directory: by default, that's something like: {Tomcat Home}/work/Catalina///org/apache/jsp/, which is the file that's referenced in the error above. You'll have to look at the line number in *that* file (line 55 in the java file) and see what code is at that line, then look and see where that code is in the JSP. For example, in the JSP you might see: <%= foo.toString() %> when in the java file it looks like: out.print( foo.toString() ); It's really the same code, but it just looks different; read the java, and refer back to the JSP and it will probably make sense. One thing that can screw you up and be hard to track down is misplaced parens () or braces {} becuase the compiler matches up the braces in your jsp code with the java code added at translation time and reports seemingly nonsensical errors. Hope this all helps. Cheers, PST On 8/11/05, Fermin Jimenez Najar <[EMAIL PROTECTED]> wrote: > Thanks for answering. > That I mean, is this: > i get this error message (and it is in the logs, too) > > C:\Tomcat50\work\Catalina\localhost\activation\org\apache\jsp\secundarios_js > p.java:55: not a statement >ocsa; > > I make that error intentionally. > I thought that the tomcat say "the error is in the line 55" but actually, i > put that error in the line > number 8 of my JSP file. > I know that every jsp is translated into a servelt, but, how i can know the > exact line of the JSP file ? > > > > -Message d'origine- > De : Patrick Thomas [mailto:[EMAIL PROTECTED] > Envoyé : Jueves, 11 de Agosto de 2005 07:15 p.m. > À : Tomcat Users List > Objet : Re: Knowing the line when the error happen > > > Fermin, > This information is usually recorded in your log files, or alternately > printed into the console window if Tomcat is running in windowed mode > (because you manually launched the tomcat5 executable). > > Look in {Tomcat Home}/logs/ for a file like "stdout_20050802.log" > (stdout_MMDD.log). There are other places this file might live, > but that's the default. > > Cheers, > PST > > On 8/11/05, Fermin Jimenez Najar <[EMAIL PROTECTED]> wrote: > > Hi. I just has beginning to use the Tomcat, for programming in JSP. > > I have the 5.0 version. > > > > When an error occurs, i get an HTTP 500 page with the details. > > But, i can not find an information that told me the exact line of my JSP > > where the error happens. > > > > What can i do for know that ? thank. > > > > > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Knowing the line when the error happen
Ah. Looks like I answered the wrong question. It's a two step process to make a servlet from a .jsp file: first is translate it (make a .jsp into a .java), the next is compile it. When the jsp is made into a servlet it gets all of the stuff added to it that makes it into a real java file ("public final class extends org.apache.jasper.runtime.HttpJspBase implements org.apache.jasper.runtime.JspSourceDependent" etc etc). The newly created file is placed into a the work directory: by default, that's something like: {Tomcat Home}/work/Catalina///org/apache/jsp/, which is the file that's referenced in the error above. You'll have to look at the line number in *that* file (line 55 in the java file) and see what code is at that line, then look and see where that code is in the JSP. For example, in the JSP you might see: <%= foo.toString() %> when in the java file it looks like: out.print( foo.toString() ); It's really the same code, but it just looks different; read the java, and refer back to the JSP and it will probably make sense. One thing that can screw you up and be hard to track down is misplaced parens () or braces {} becuase the compiler matches up the braces in your jsp code with the java code added at translation time and reports seemingly nonsensical errors. Hope this all helps. Cheers, PST On 8/11/05, Fermin Jimenez Najar <[EMAIL PROTECTED]> wrote: > Thanks for answering. > That I mean, is this: > i get this error message (and it is in the logs, too) > > C:\Tomcat50\work\Catalina\localhost\activation\org\apache\jsp\secundarios_js > p.java:55: not a statement >ocsa; > > I make that error intentionally. > I thought that the tomcat say "the error is in the line 55" but actually, i > put that error in the line > number 8 of my JSP file. > I know that every jsp is translated into a servelt, but, how i can know the > exact line of the JSP file ? > > > > -Message d'origine- > De : Patrick Thomas [mailto:[EMAIL PROTECTED] > Envoyé : Jueves, 11 de Agosto de 2005 07:15 p.m. > À : Tomcat Users List > Objet : Re: Knowing the line when the error happen > > > Fermin, > This information is usually recorded in your log files, or alternately > printed into the console window if Tomcat is running in windowed mode > (because you manually launched the tomcat5 executable). > > Look in {Tomcat Home}/logs/ for a file like "stdout_20050802.log" > (stdout_MMDD.log). There are other places this file might live, > but that's the default. > > Cheers, > PST > > On 8/11/05, Fermin Jimenez Najar <[EMAIL PROTECTED]> wrote: > > Hi. I just has beginning to use the Tomcat, for programming in JSP. > > I have the 5.0 version. > > > > When an error occurs, i get an HTTP 500 page with the details. > > But, i can not find an information that told me the exact line of my JSP > > where the error happens. > > > > What can i do for know that ? thank. > > > > > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Knowing the line when the error happen
Thanks for answering. That I mean, is this: i get this error message (and it is in the logs, too) C:\Tomcat50\work\Catalina\localhost\activation\org\apache\jsp\secundarios_js p.java:55: not a statement ocsa; I make that error intentionally. I thought that the tomcat say "the error is in the line 55" but actually, i put that error in the line number 8 of my JSP file. I know that every jsp is translated into a servelt, but, how i can know the exact line of the JSP file ? -Message d'origine- De : Patrick Thomas [mailto:[EMAIL PROTECTED] Envoyé : Jueves, 11 de Agosto de 2005 07:15 p.m. À : Tomcat Users List Objet : Re: Knowing the line when the error happen Fermin, This information is usually recorded in your log files, or alternately printed into the console window if Tomcat is running in windowed mode (because you manually launched the tomcat5 executable). Look in {Tomcat Home}/logs/ for a file like "stdout_20050802.log" (stdout_MMDD.log). There are other places this file might live, but that's the default. Cheers, PST On 8/11/05, Fermin Jimenez Najar <[EMAIL PROTECTED]> wrote: > Hi. I just has beginning to use the Tomcat, for programming in JSP. > I have the 5.0 version. > > When an error occurs, i get an HTTP 500 page with the details. > But, i can not find an information that told me the exact line of my JSP > where the error happens. > > What can i do for know that ? thank. > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Knowing the line when the error happen
Fermin, This information is usually recorded in your log files, or alternately printed into the console window if Tomcat is running in windowed mode (because you manually launched the tomcat5 executable). Look in {Tomcat Home}/logs/ for a file like "stdout_20050802.log" (stdout_MMDD.log). There are other places this file might live, but that's the default. Cheers, PST On 8/11/05, Fermin Jimenez Najar <[EMAIL PROTECTED]> wrote: > Hi. I just has beginning to use the Tomcat, for programming in JSP. > I have the 5.0 version. > > When an error occurs, i get an HTTP 500 page with the details. > But, i can not find an information that told me the exact line of my JSP > where the error happens. > > What can i do for know that ? thank. > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Knowing the line when the error happen
Hi. I just has beginning to use the Tomcat, for programming in JSP. I have the 5.0 version. When an error occurs, i get an HTTP 500 page with the details. But, i can not find an information that told me the exact line of my JSP where the error happens. What can i do for know that ? thank. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]