RE: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9

2005-08-12 Thread Allistair Crossley
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.

Allistair.

 -Original Message-
 From: Gary Zhu [mailto:[EMAIL PROTECTED]
 Sent: 12 August 2005 16:17
 To: Tomcat Users List
 Subject: Cannot compile jsp pages with log4j statements -- 
 Tomcat 5.5.9
 
 
 Hi all, 
  
 I am having difficulties to figure out the solution for this 
 issue. Jsp
 pages with log4j logging statements that worked perfect on 
 Tomcat 4.1.30
 could not compile on Tomcat 5.5.9. I commented out the log4j 
 statements
 for these problematic pages, then, tomcat 5.5.9 could compile them.
  
 Except commenting out all the log4j statements for the jsp pages in
 order to run on Tomcat 5.5.9, does anyone have any other solutions?
  
 Below is the JasperException message when attempting to compile JSP
 pages with log4j statements:
  
  
 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
ultErrorHa
 ndler.java:84)
 org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDis
patcher.ja
 va:328)
 org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompil
er.java:39
 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
Context.ja
 va:556)
 org.apache.jasper.servlet.JspServletWrapper.service(JspServlet
Wrapper.ja
 va:293)
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet
.java:291)
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
  
 Thanks
  
 Gary
 
  
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9

2005-08-12 Thread Gary Zhu
Thanks Allistair.

Below is the snippet of the code, I indicated line 39 as well.

 %@ page import=javax.servlet.http.HttpServletRequest,
  javax.servlet.http.HttpServletResponse, 
  java.io.File,
  java.io.FileOutputStream,  
  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.* %  

%
  response.setHeader(Cache-Control,no-cache); //HTTP 1.1
  response.setHeader(Pragma,no-cache); //HTTP 1.0
  response.setDateHeader(Expires, 0); //prevents caching at the proxy
server
%
  
(Line 39)%!
  static private org.apache.log4j.Logger logger =
org.apache.log4j.Logger.getLogger(agent_report_all_in_jsp.class);
%

Gary

 

-Original Message-
From: Allistair Crossley [mailto:[EMAIL PROTECTED] 
Sent: August 12, 2005 11:20 AM
To: Tomcat Users List
Subject: RE: Cannot compile jsp pages with log4j statements -- Tomcat
5.5.9

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.

Allistair.

 -Original Message-
 From: Gary Zhu [mailto:[EMAIL PROTECTED]
 Sent: 12 August 2005 16:17
 To: Tomcat Users List
 Subject: Cannot compile jsp pages with log4j statements -- Tomcat 
 5.5.9
 
 
 Hi all,
  
 I am having difficulties to figure out the solution for this issue. 
 Jsp pages with log4j logging statements that worked perfect on Tomcat 
 4.1.30 could not compile on Tomcat 5.5.9. I commented out the log4j 
 statements for these problematic pages, then, tomcat 5.5.9 could 
 compile them.
  
 Except commenting out all the log4j statements for the jsp pages in 
 order to run on Tomcat 5.5.9, does anyone have any other solutions?
  
 Below is the JasperException message when attempting to compile JSP 
 pages with log4j statements:
  
  
 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
ultErrorHa
 ndler.java:84)
 org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDis
patcher.ja
 va:328)
 org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompil
er.java:39
 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
Context.ja
 va:556)
 org.apache.jasper.servlet.JspServletWrapper.service(JspServlet
Wrapper.ja
 va:293)
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet
.java:291)
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
  
 Thanks
  
 Gary
 
  
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


-
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: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9

2005-08-12 Thread Jon Wingfield

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 
generated from the jsp. Are you sure it's correct? If it is then you may 
have to use a String argument instead of a class when calling the Logger 
factory method.


Gary Zhu wrote:

Thanks Allistair.

Below is the snippet of the code, I indicated line 39 as well.

 %@ page import=javax.servlet.http.HttpServletRequest,
  javax.servlet.http.HttpServletResponse, 
  java.io.File,
  java.io.FileOutputStream,  
  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.* %  


%
  response.setHeader(Cache-Control,no-cache); //HTTP 1.1
  response.setHeader(Pragma,no-cache); //HTTP 1.0
  response.setDateHeader(Expires, 0); //prevents caching at the proxy
server
%
  
(Line 39)%!

  static private org.apache.log4j.Logger logger =
org.apache.log4j.Logger.getLogger(agent_report_all_in_jsp.class);
%

Gary

 


-Original Message-
From: Allistair Crossley [mailto:[EMAIL PROTECTED] 
Sent: August 12, 2005 11:20 AM

To: Tomcat Users List
Subject: RE: Cannot compile jsp pages with log4j statements -- Tomcat
5.5.9

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.

Allistair.



-Original Message-
From: Gary Zhu [mailto:[EMAIL PROTECTED]
Sent: 12 August 2005 16:17
To: Tomcat Users List
Subject: Cannot compile jsp pages with log4j statements -- Tomcat 
5.5.9



Hi all,

I am having difficulties to figure out the solution for this issue. 
Jsp pages with log4j logging statements that worked perfect on Tomcat 
4.1.30 could not compile on Tomcat 5.5.9. I commented out the log4j 
statements for these problematic pages, then, tomcat 5.5.9 could 
compile them.


Except commenting out all the log4j statements for the jsp pages in 
order to run on Tomcat 5.5.9, does anyone have any other solutions?


Below is the JasperException message when attempting to compile JSP 
pages with log4j statements:



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


ultErrorHa


ndler.java:84)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDis


patcher.ja


va:328)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompil


er.java:39


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


Context.ja


va:556)
org.apache.jasper.servlet.JspServletWrapper.service(JspServlet


Wrapper.ja


va:293)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet


.java:291)


org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

Thanks





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9

2005-08-12 Thread Allistair Crossley
I think Jon maybe onto something ... to use agent_report_all_in_jsp.class your 
JSP would need to be called

agent_report_all_in.jsp

Is that the case?

Allistair/

 -Original Message-
 From: Jon Wingfield [mailto:[EMAIL PROTECTED]
 Sent: 12 August 2005 16:44
 To: Tomcat Users List
 Subject: Re: Cannot compile jsp pages with log4j statements -- Tomcat
 5.5.9
 
 
 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 
 generated from the jsp. Are you sure it's correct? If it is 
 then you may 
 have to use a String argument instead of a class when calling 
 the Logger 
 factory method.
 
 Gary Zhu wrote:
  Thanks Allistair.
  
  Below is the snippet of the code, I indicated line 39 as well.
  
   %@ page import=javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse, 
java.io.File,
java.io.FileOutputStream,  
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.* %  
  
  %
response.setHeader(Cache-Control,no-cache); //HTTP 1.1
response.setHeader(Pragma,no-cache); //HTTP 1.0
response.setDateHeader(Expires, 0); //prevents caching 
 at the proxy
  server
  %

  (Line 39)%!
static private org.apache.log4j.Logger logger =
  org.apache.log4j.Logger.getLogger(agent_report_all_in_jsp.class);
  %
  
  Gary
  
   
  
  -Original Message-
  From: Allistair Crossley [mailto:[EMAIL PROTECTED] 
  Sent: August 12, 2005 11:20 AM
  To: Tomcat Users List
  Subject: RE: Cannot compile jsp pages with log4j statements 
 -- Tomcat
  5.5.9
  
  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.
  
  Allistair.
  
  
 -Original Message-
 From: Gary Zhu [mailto:[EMAIL PROTECTED]
 Sent: 12 August 2005 16:17
 To: Tomcat Users List
 Subject: Cannot compile jsp pages with log4j statements -- Tomcat 
 5.5.9
 
 
 Hi all,
  
 I am having difficulties to figure out the solution for this issue. 
 Jsp pages with log4j logging statements that worked perfect 
 on Tomcat 
 4.1.30 could not compile on Tomcat 5.5.9. I commented out the log4j 
 statements for these problematic pages, then, tomcat 5.5.9 could 
 compile them.
  
 Except commenting out all the log4j statements for the jsp pages in 
 order to run on Tomcat 5.5.9, does anyone have any other solutions?
  
 Below is the JasperException message when attempting to compile JSP 
 pages with log4j statements:
  
  
 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
  
  ultErrorHa
  
 ndler.java:84)
 org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDis
  
  patcher.ja
  
 va:328)
 org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompil
  
  er.java:39
  
 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
  
  Context.ja
  
 va:556)
 org.apache.jasper.servlet.JspServletWrapper.service(JspServlet
  
  Wrapper.ja
  
 va:293)
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet
  
  .java:291)
  
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
  
 Thanks
  
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9

2005-08-12 Thread Gary Zhu
First of all, I am not the one who did this app.

Second, it is the case that the JSP file is called
agent_report_all_in.jsp. 

The question is: Why it runs perfect on Tomcat 4.1.30, and has issues
with Tomcat 5.5.9? The JasperCompiler on Tomcat5.5.9 has introduced some
bugs that JasperCompiler on Tomcat 4.1.30 does not have?

Thanks.

Gary 

-Original Message-
From: Allistair Crossley [mailto:[EMAIL PROTECTED] 
Sent: August 12, 2005 11:46 AM
To: Tomcat Users List
Subject: RE: Cannot compile jsp pages with log4j statements -- Tomcat
5.5.9

I think Jon maybe onto something ... to use
agent_report_all_in_jsp.class your JSP would need to be called

agent_report_all_in.jsp

Is that the case?

Allistair/

 -Original Message-
 From: Jon Wingfield [mailto:[EMAIL PROTECTED]
 Sent: 12 August 2005 16:44
 To: Tomcat Users List
 Subject: Re: Cannot compile jsp pages with log4j statements -- Tomcat
 5.5.9
 
 
 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 
 generated from the jsp. Are you sure it's correct? If it is then you 
 may have to use a String argument instead of a class when calling the 
 Logger factory method.
 
 Gary Zhu wrote:
  Thanks Allistair.
  
  Below is the snippet of the code, I indicated line 39 as well.
  
   %@ page import=javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse, 
java.io.File,
java.io.FileOutputStream,  
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.* %  
  
  %
response.setHeader(Cache-Control,no-cache); //HTTP 1.1
response.setHeader(Pragma,no-cache); //HTTP 1.0
response.setDateHeader(Expires, 0); //prevents caching
 at the proxy
  server
  %

  (Line 39)%!
static private org.apache.log4j.Logger logger = 
  org.apache.log4j.Logger.getLogger(agent_report_all_in_jsp.class);
  %
  
  Gary
  
   
  
  -Original Message-
  From: Allistair Crossley [mailto:[EMAIL PROTECTED]
  Sent: August 12, 2005 11:20 AM
  To: Tomcat Users List
  Subject: RE: Cannot compile jsp pages with log4j statements
 -- Tomcat
  5.5.9
  
  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.
  
  Allistair.
  
  
 -Original Message-
 From: Gary Zhu [mailto:[EMAIL PROTECTED]
 Sent: 12 August 2005 16:17
 To: Tomcat Users List
 Subject: Cannot compile jsp pages with log4j statements -- Tomcat
 5.5.9
 
 
 Hi all,
  
 I am having difficulties to figure out the solution for this issue. 
 Jsp pages with log4j logging statements that worked perfect
 on Tomcat
 4.1.30 could not compile on Tomcat 5.5.9. I commented out the log4j 
 statements for these problematic pages, then, tomcat 5.5.9 could 
 compile them.
  
 Except commenting out all the log4j statements for the jsp pages in 
 order to run on Tomcat 5.5.9, does anyone have any other solutions?
  
 Below is the JasperException message when attempting to compile JSP 
 pages with log4j statements:
  
  
 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
  
  ultErrorHa
  
 ndler.java:84)
 org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDis
  
  patcher.ja
  
 va:328)
 org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompil
  
  er.java:39
  
 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
  
  Context.ja
  
 va:556)
 org.apache.jasper.servlet.JspServletWrapper.service(JspServlet
  
  Wrapper.ja
  
 va:293)
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet
  
  .java:291)
  
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
  
 Thanks
  
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE

RE: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9

2005-08-12 Thread Allistair Crossley
Hi,

It doesn't really matter if you did the app or not, it's irrelevant to this 
conversation and you asked a question.

Anyway, yes an awful lot has changed between 4.1 and 5.5 including the Jasper 
compiler, see the change logs.

However, I have tested your declaration on 5.5.9 and do not get this error 
therefore I think we can rule out the Jasper compiler.

%!
  static private org.apache.log4j.Logger logger = 
org.apache.log4j.Logger.getLogger(_5_jsp.class);
%

Have you definately cross-checked the class filename in the 
tomcat_home/work/Catalina/localhost/_/org/apache/jsp location?

Allistair.

 -Original Message-
 From: Gary Zhu [mailto:[EMAIL PROTECTED]
 Sent: 12 August 2005 17:08
 To: Tomcat Users List
 Subject: RE: Cannot compile jsp pages with log4j statements -- Tomcat
 5.5.9
 
 
 First of all, I am not the one who did this app.
 
 Second, it is the case that the JSP file is called
 agent_report_all_in.jsp. 
 
 The question is: Why it runs perfect on Tomcat 4.1.30, and has issues
 with Tomcat 5.5.9? The JasperCompiler on Tomcat5.5.9 has 
 introduced some
 bugs that JasperCompiler on Tomcat 4.1.30 does not have?
 
 Thanks.
 
 Gary 
 
 -Original Message-
 From: Allistair Crossley [mailto:[EMAIL PROTECTED] 
 Sent: August 12, 2005 11:46 AM
 To: Tomcat Users List
 Subject: RE: Cannot compile jsp pages with log4j statements -- Tomcat
 5.5.9
 
 I think Jon maybe onto something ... to use
 agent_report_all_in_jsp.class your JSP would need to be called
 
 agent_report_all_in.jsp
 
 Is that the case?
 
 Allistair/
 
  -Original Message-
  From: Jon Wingfield [mailto:[EMAIL PROTECTED]
  Sent: 12 August 2005 16:44
  To: Tomcat Users List
  Subject: Re: Cannot compile jsp pages with log4j statements 
 -- Tomcat
  5.5.9
  
  
  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 
  generated from the jsp. Are you sure it's correct? If it is 
 then you 
  may have to use a String argument instead of a class when 
 calling the 
  Logger factory method.
  
  Gary Zhu wrote:
   Thanks Allistair.
   
   Below is the snippet of the code, I indicated line 39 as well.
   
%@ page import=javax.servlet.http.HttpServletRequest,
 javax.servlet.http.HttpServletResponse, 
 java.io.File,
 java.io.FileOutputStream,  
 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.* %  
   
   %
 response.setHeader(Cache-Control,no-cache); //HTTP 1.1
 response.setHeader(Pragma,no-cache); //HTTP 1.0
 response.setDateHeader(Expires, 0); //prevents caching
  at the proxy
   server
   %
 
   (Line 39)%!
 static private org.apache.log4j.Logger logger = 
   org.apache.log4j.Logger.getLogger(agent_report_all_in_jsp.class);
   %
   
   Gary
   

   
   -Original Message-
   From: Allistair Crossley [mailto:[EMAIL PROTECTED]
   Sent: August 12, 2005 11:20 AM
   To: Tomcat Users List
   Subject: RE: Cannot compile jsp pages with log4j statements
  -- Tomcat
   5.5.9
   
   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.
   
   Allistair.
   
   
  -Original Message-
  From: Gary Zhu [mailto:[EMAIL PROTECTED]
  Sent: 12 August 2005 16:17
  To: Tomcat Users List
  Subject: Cannot compile jsp pages with log4j statements -- Tomcat
  5.5.9
  
  
  Hi all,
   
  I am having difficulties to figure out the solution for 
 this issue. 
  Jsp pages with log4j logging statements that worked perfect
  on Tomcat
  4.1.30 could not compile on Tomcat 5.5.9. I commented out 
 the log4j 
  statements for these problematic pages, then, tomcat 5.5.9 could 
  compile them.
   
  Except commenting out all the log4j statements for the 
 jsp pages in 
  order to run on Tomcat 5.5.9, does anyone have any other 
 solutions?
   
  Below is the JasperException message when attempting to 
 compile JSP 
  pages with log4j statements:
   
   
  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
   
   ultErrorHa
   
  ndler.java:84)
  org.apache.jasper.compiler.ErrorDispatcher.javacError

Re: Cannot compile jsp pages with log4j statements -- Tomcat 5.5.9

2005-08-12 Thread Jon Wingfield
One major change between the 4.1.x branch and the 5.x.x branch is 
packages in generated servlets. In tc4.1.x all the jsps were in the 
org.apache.jsp package irrespective of the structure of the site.
From 5 onwards the jsp directory structure is also part of the package 
name. So, my guess is agent_report_all_in.jsp is in a different 
directory from the one that fails to compile. It works in 4.1 but needs 
to be imported in 5.x.x.



Allistair Crossley wrote:

Hi,

It doesn't really matter if you did the app or not, it's irrelevant to this 
conversation and you asked a question.

Anyway, yes an awful lot has changed between 4.1 and 5.5 including the Jasper 
compiler, see the change logs.

However, I have tested your declaration on 5.5.9 and do not get this error 
therefore I think we can rule out the Jasper compiler.

%!
  static private org.apache.log4j.Logger logger = 
org.apache.log4j.Logger.getLogger(_5_jsp.class);

%

Have you definately cross-checked the class filename in the 
tomcat_home/work/Catalina/localhost/_/org/apache/jsp location?

Allistair.



-Original Message-
From: Gary Zhu [mailto:[EMAIL PROTECTED]
Sent: 12 August 2005 17:08
To: Tomcat Users List
Subject: RE: Cannot compile jsp pages with log4j statements -- Tomcat
5.5.9


First of all, I am not the one who did this app.

Second, it is the case that the JSP file is called
agent_report_all_in.jsp. 


The question is: Why it runs perfect on Tomcat 4.1.30, and has issues
with Tomcat 5.5.9? The JasperCompiler on Tomcat5.5.9 has 
introduced some

bugs that JasperCompiler on Tomcat 4.1.30 does not have?

Thanks.

Gary 


-Original Message-
From: Allistair Crossley [mailto:[EMAIL PROTECTED] 
Sent: August 12, 2005 11:46 AM

To: Tomcat Users List
Subject: RE: Cannot compile jsp pages with log4j statements -- Tomcat
5.5.9

I think Jon maybe onto something ... to use
agent_report_all_in_jsp.class your JSP would need to be called

agent_report_all_in.jsp

Is that the case?

Allistair/



-Original Message-
From: Jon Wingfield [mailto:[EMAIL PROTECTED]
Sent: 12 August 2005 16:44
To: Tomcat Users List
Subject: Re: Cannot compile jsp pages with log4j statements 


-- Tomcat


5.5.9


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 
generated from the jsp. Are you sure it's correct? If it is 


then you 

may have to use a String argument instead of a class when 


calling the 


Logger factory method.

Gary Zhu wrote:


Thanks Allistair.

Below is the snippet of the code, I indicated line 39 as well.

%@ page import=javax.servlet.http.HttpServletRequest,
 javax.servlet.http.HttpServletResponse, 
 java.io.File,
 java.io.FileOutputStream,  
 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.* %  


%
 response.setHeader(Cache-Control,no-cache); //HTTP 1.1
 response.setHeader(Pragma,no-cache); //HTTP 1.0
 response.setDateHeader(Expires, 0); //prevents caching


at the proxy


server
%
 
(Line 39)%!
 static private org.apache.log4j.Logger logger = 
org.apache.log4j.Logger.getLogger(agent_report_all_in_jsp.class);

%

Gary



-Original Message-
From: Allistair Crossley [mailto:[EMAIL PROTECTED]
Sent: August 12, 2005 11:20 AM
To: Tomcat Users List
Subject: RE: Cannot compile jsp pages with log4j statements


-- Tomcat


5.5.9

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.

Allistair.




-Original Message-
From: Gary Zhu [mailto:[EMAIL PROTECTED]
Sent: 12 August 2005 16:17
To: Tomcat Users List
Subject: Cannot compile jsp pages with log4j statements -- Tomcat
5.5.9


Hi all,

I am having difficulties to figure out the solution for 


this issue. 


Jsp pages with log4j logging statements that worked perfect


on Tomcat

4.1.30 could not compile on Tomcat 5.5.9. I commented out 


the log4j 

statements for these problematic pages, then, tomcat 5.5.9 could 
compile them.


Except commenting out all the log4j statements for the 


jsp pages in 

order to run on Tomcat 5.5.9, does anyone have any other 


solutions?

Below is the JasperException message when attempting to 


compile JSP 


pages with log4j statements:


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