Re: [tomcat] branch master updated: More debugging

2020-08-17 Thread Mark Thomas
On 17/08/2020 13:14, ma...@apache.org wrote:
> This is an automated email from the ASF dual-hosted git repository.
> 
> markt pushed a commit to branch master
> in repository https://gitbox.apache.org/repos/asf/tomcat.git
> 
> 
> The following commit(s) were added to refs/heads/master by this push:
>  new bc1adec  More debugging

Just an update on where I have got to with this.

Specifying jsp-file in web.xml creates a Wrapper instance. Init params
are copied from JSP servlet - including load-on-startup.

The JSP is compiled and the class and Java files are placed in the same
places the JSP servlet would place them.

The request arrives and is mapped to the JSP servlet. Locally, the JSP
servlet uses the pre-compiled servlet.

On s390x the JSP servlet appears to attempt recompilation. Because this
happens with the JSP servlet's standard settings, the compilation fails.

I am currently trying to figure out why local testing re-uses the
pre-compiled servlet but s390x recompiles it. I'm currently looking at
timestamps of files.

Mark

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch master updated: More debugging

2020-08-17 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/master by this push:
 new bc1adec  More debugging
bc1adec is described below

commit bc1adec64bc606dc21580e2eba261429180bf540
Author: Mark Thomas 
AuthorDate: Mon Aug 17 13:14:26 2020 +0100

More debugging
---
 .../jasper/compiler/TestParserNoStrictWhitespace.java  | 18 ++
 1 file changed, 18 insertions(+)

diff --git a/test/org/apache/jasper/compiler/TestParserNoStrictWhitespace.java 
b/test/org/apache/jasper/compiler/TestParserNoStrictWhitespace.java
index 6f39449..e8f05c9 100644
--- a/test/org/apache/jasper/compiler/TestParserNoStrictWhitespace.java
+++ b/test/org/apache/jasper/compiler/TestParserNoStrictWhitespace.java
@@ -17,6 +17,10 @@
 
 package org.apache.jasper.compiler;
 
+import java.io.File;
+
+import jakarta.servlet.ServletContext;
+
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -40,12 +44,26 @@ public class TestParserNoStrictWhitespace extends 
TomcatBaseTest {
 StandardContext ctxt = (StandardContext) 
getTomcatInstance().getHost().findChild("/test");
 StandardWrapper w = (StandardWrapper) 
ctxt.findChild("bug49297NoSpace");
 System.out.println("JSP strict whitespace: [" +  
w.getInitParameter("strictWhitespace") + "]");
+
+File tmpJsp = new File("test/webapp/bug49nnn/bug49297NoSpace.jsp");
+System.out.println(".jsp [" + tmpJsp.lastModified() + "]");
+
+File tmp = (File) 
ctxt.getServletContext().getAttribute(ServletContext.TEMPDIR);
+File tmpJava = new File(tmp, 
"org/apache/jsp/bug49nnn/bug49297NoSpace_jsp.java");
+File tmpClass = new File(tmp, 
"org/apache/jsp/bug49nnn/bug49297NoSpace_jsp.class");
+System.out.println("before request  .java [" + tmpJava.lastModified() 
+ "]");
+System.out.println("before request .class [" + tmpClass.lastModified() 
+ "]");
 // debug code end
 
 ByteChunk res = new ByteChunk();
 int sc = getUrl("http://localhost:"; + getPort() +
 "/test/bug49nnn/bug49297NoSpace.jsp", res, null);
 
+// Github / Travis / s390x debug code
+System.out.println("after request  .java [" + tmpJava.lastModified() + 
"]");
+System.out.println("after request .class [" + tmpClass.lastModified() 
+ "]");
+// debug code end
+
 Assert.assertEquals(200, sc);
 assertEcho(res.toString(), "Hello World");
 }


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org