Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@www.apache.org Received: (qmail 27909 invoked from network); 12 Aug 2005 15:47:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 12 Aug 2005 15:47:00 -0000 Received: (qmail 30135 invoked by uid 500); 12 Aug 2005 15:46:32 -0000 Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 30065 invoked by uid 500); 12 Aug 2005 15:46:31 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 29894 invoked by uid 99); 12 Aug 2005 15:46:31 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Aug 2005 08:46:30 -0700 X-ASF-Spam-Status: No, hits=0.4 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received-SPF: error (asf.osuosl.org: local policy) Received: from [195.172.82.236] (HELO MAIL2.qas.com) (195.172.82.236) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Aug 2005 08:46:50 -0700 Received: from orion.qas.com (orion.qas.com) by MAIL2.qas.com (Content Technologies SMTPRS 4.3.17) with ESMTP id for ; Fri, 12 Aug 2005 16:46:02 +0100 X-MimeOLE: Produced By Microsoft Exchange V6.0.6603.0 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9 Date: Fri, 12 Aug 2005 16:46:02 +0100 Message-ID: <5684A7E6FB10504393A2806C1F4C0210076CE2C0@orion.qas.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9 Thread-Index: AcWfVJCQSyZf5nOfSouKwxSfbGMAJQAAA7ew From: "Allistair Crossley" To: "Tomcat Users List" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N I think Jon maybe onto something ... to use agent_report_all_in_jsp.class y= our JSP would need to be called agent_report_all_in.jsp Is that the case? Allistair/ > -----Original Message----- > From: Jon Wingfield [mailto:jon.wingfield@mkodo.com] > Sent: 12 August 2005 16:44 > To: Tomcat Users List > Subject: Re: Cannot compile jsp pages with log4j statements -- Tomcat > 5.5.9 >=20 >=20 > It doesn't like the agent_report_all_in_jsp classname. > I'm guessing that's supposed to be the name of the servlet class=20 > generated from the jsp. Are you sure it's correct? If it is=20 > then you may=20 > have to use a String argument instead of a class when calling=20 > the Logger=20 > factory method. >=20 > Gary Zhu wrote: > > Thanks Allistair. > >=20 > > Below is the snippet of the code, I indicated line 39 as well. > >=20 > > <%@ page import=3D"javax.servlet.http.HttpServletRequest, > > javax.servlet.http.HttpServletResponse,=20 > > java.io.File, =20 > > java.io.FileOutputStream, =20 > > java.io.IOException, > > java.io.BufferedReader, > > java.io.FileInputStream, > > java.util.StringTokenizer, > > java.util.ArrayList, > > java.io.InputStreamReader, > > java.io.InputStream, > > java.io.OutputStream, > > com.timeicr.sysco.web.bean.AgentBean, > > com.timeicr.util.web.session.*, > > org.apache.log4j.*" %> =20 > >=20 > > <% > > response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 > > response.setHeader("Pragma","no-cache"); //HTTP 1.0 > > response.setDateHeader("Expires", 0); //prevents caching=20 > at the proxy > > server > > %> > > =20 > > (Line 39)<%! > > static private org.apache.log4j.Logger logger =3D > > org.apache.log4j.Logger.getLogger(agent_report_all_in_jsp.class); > > %> > >=20 > > Gary > >=20 > > =20 > >=20 > > -----Original Message----- > > From: Allistair Crossley [mailto:Allistair.Crossley@QAS.com]=20 > > Sent: August 12, 2005 11:20 AM > > To: Tomcat Users List > > Subject: RE: Cannot compile jsp pages with log4j statements=20 > -- Tomcat > > 5.5.9 > >=20 > > Can you post the JSP directives, and the scriplet that calls log4j? > > Also, you have been given a line number 39 .. can you work out which > > line this is in the work directory. > >=20 > > Allistair. > >=20 > >=20 > >>-----Original Message----- > >>From: Gary Zhu [mailto:gzhu@timeicr.com] > >>Sent: 12 August 2005 16:17 > >>To: Tomcat Users List > >>Subject: Cannot compile jsp pages with log4j statements -- Tomcat=20 > >>5.5.9 > >> > >> > >>Hi all, > >>=20 > >>I am having difficulties to figure out the solution for this issue.=20 > >>Jsp pages with log4j logging statements that worked perfect=20 > on Tomcat=20 > >>4.1.30 could not compile on Tomcat 5.5.9. I commented out the log4j=20 > >>statements for these problematic pages, then, tomcat 5.5.9 could=20 > >>compile them. > >>=20 > >>Except commenting out all the log4j statements for the jsp pages in=20 > >>order to run on Tomcat 5.5.9, does anyone have any other solutions? > >>=20 > >>Below is the JasperException message when attempting to compile JSP=20 > >>pages with log4j statements: > >>=20 > >>=20 > >>org.apache.jasper.JasperException: Unable to compile class for JSP > >> > >>An error occurred at line: 39 in the jsp file: > >>/sysco/agent_report_all_in.jsp > >>Generated servlet error: > >>agent_report_all_in_jsp cannot be resolved or is not a type > >> > >> > >>org.apache.jasper.compiler.DefaultErrorHandler.javacError(Defa > >=20 > > ultErrorHa > >=20 > >>ndler.java:84) > >>org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDis > >=20 > > patcher.ja > >=20 > >>va:328) > >>org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompil > >=20 > > er.java:39 > >=20 > >>7) > >>org.apache.jasper.compiler.Compiler.compile(Compiler.java:288) > >>org.apache.jasper.compiler.Compiler.compile(Compiler.java:267) > >>org.apache.jasper.compiler.Compiler.compile(Compiler.java:255) > >>org.apache.jasper.JspCompilationContext.compile(JspCompilation > >=20 > > Context.ja > >=20 > >>va:556) > >>org.apache.jasper.servlet.JspServletWrapper.service(JspServlet > >=20 > > Wrapper.ja > >=20 > >>va:293) > >>org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet > >=20 > > .java:291) > >=20 > >>org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) > >>javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > >>=20 > >>Thanks > >>=20 >=20 >=20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org >=20 >=20 =20 ------------------------------------------------------- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 ------------------------------------------------------- --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org