Skip to content

Commit

Permalink
Merge master and resolve conflicts
Browse files Browse the repository at this point in the history
Signed-off-by: kaido207 <kaido.hiroki@fujitsu.com>
  • Loading branch information
kaido207 committed May 9, 2022
2 parents f105017 + c61c91e commit e569c34
Show file tree
Hide file tree
Showing 20 changed files with 963 additions and 816 deletions.
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.10.1</version>
<configuration>
<source>11</source>
<target>11</target>
Expand All @@ -178,7 +178,7 @@
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>5.1.2</version>
<version>5.1.4</version>
<configuration>
<instructions>
<Automatic-Module-Name>org.glassfish.wasp</Automatic-Module-Name>
Expand Down Expand Up @@ -213,7 +213,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
<version>3.2.2</version>
<configuration>
<archive>
<manifestFile>
Expand Down
25 changes: 9 additions & 16 deletions src/main/java/org/glassfish/wasp/Constants.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* Copyright (c) 2022, 2022 Contributors to the Eclipse Foundation
* Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright 2004 The Apache Software Foundation
*
Expand Down Expand Up @@ -109,16 +110,16 @@ public class Constants {
*/
public static final String TAGLIB_DTD_PUBLIC_ID_11 = "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN";
public static final String TAGLIB_DTD_RESOURCE_PATH_11 = "/javax/servlet/jsp/resources/web-jsptaglibrary_1_1.dtd";

public static final String TAGLIB_DTD_PUBLIC_ID_12 = "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN";
public static final String TAGLIB_DTD_RESOURCE_PATH_12 = "/javax/servlet/jsp/resources/web-jsptaglibrary_1_2.dtd";

public static final String TAGLIB_SCHEMA_PUBLIC_ID_20 = "web-jsptaglibrary_2_0.xsd";
public static final String TAGLIB_SCHEMA_RESOURCE_PATH_20 = "/javax/servlet/jsp/resources/web-jsptaglibrary_2_0.xsd";

public static final String TAGLIB_SCHEMA_PUBLIC_ID_21 = "web-jsptaglibrary_2_1.xsd";
public static final String TAGLIB_SCHEMA_RESOURCE_PATH_21 = "/javax/servlet/jsp/resources/web-jsptaglibrary_2_1.xsd";

public static final String SCHEMA_LOCATION_JSP_20 = "http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd";
public static final String SCHEMA_LOCATION_JSP_21 = "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd";

Expand All @@ -128,27 +129,19 @@ public class Constants {
*/
public static final String WEBAPP_DTD_PUBLIC_ID_22 = "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN";
public static final String WEBAPP_DTD_RESOURCE_PATH_22 = "/javax/servlet/resources/web-app_2_2.dtd";

public static final String WEBAPP_DTD_PUBLIC_ID_23 = "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN";
public static final String WEBAPP_DTD_RESOURCE_PATH_23 = "/javax/servlet/resources/web-app_2_3.dtd";

public static final String WEBAPP_SCHEMA_PUBLIC_ID_24 = "web-app_2_4.xsd";
public static final String WEBAPP_SCHEMA_RESOURCE_PATH_24 = "/javax/servlet/resources/web-app_2_4.xsd";

public static final String WEBAPP_SCHEMA_PUBLIC_ID_25 = "web-app_2_5.xsd";
public static final String WEBAPP_SCHEMA_RESOURCE_PATH_25 = "/javax/servlet/resources/web-app_2_5.xsd";

public static final String SCHEMA_LOCATION_WEBAPP_24 = "http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";
public static final String SCHEMA_LOCATION_WEBAPP_25 = "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";


/**
* Default URLs to download the pluging for Netscape and IE.
*/
public static final String NS_PLUGIN_URL = "http://java.sun.com/products/plugin/";

public static final String IE_PLUGIN_URL = "http://java.sun.com/products/plugin/1.2.2/jinstall-1_2_2-win.cab#Version=1,2,2,0";

/**
* Prefix to use for generated temporary variable names
*/
Expand Down
25 changes: 1 addition & 24 deletions src/main/java/org/glassfish/wasp/EmbeddedServletOptions.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Copyright (c) 2021, 2022 Contributors to the Eclipse Foundation
* Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright 2004 The Apache Software Foundation
* Copyright (c) 2021 Contributors to the Eclipse Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -125,12 +125,6 @@ public final class EmbeddedServletOptions implements Options {
*/
private File scratchDir;

/**
* Need to have this as is for versions 4 and 5 of IE. Can be set from the initParams so if it changes in the future all
* that is needed is to have a jsp initParam of type ieClassId="<value>"
*/
private String ieClassId = "clsid:8AD9C840-044E-11D1-B3E9-00805F499D93";

/**
* What classpath should I use while compiling generated servlets?
*/
Expand Down Expand Up @@ -315,14 +309,6 @@ public boolean isDefaultBufferNone() {
return defaultBufferNone;
}

/**
* Class ID for use in the plugin tag when the browser is IE.
*/
@Override
public String getIeClassId() {
return ieClassId;
}

/**
* What is my scratch dir?
*/
Expand All @@ -339,7 +325,6 @@ public String getClassPath() {
return classpath;
}

// START PWC 1.2 6311155
/**
* Gets the system class path.
*
Expand All @@ -349,7 +334,6 @@ public String getClassPath() {
public String getSystemClassPath() {
return sysClassPath;
}
// END PWC 1.2 6311155

/**
* Is generation of X-Powered-By response header enabled/disabled?
Expand Down Expand Up @@ -500,21 +484,14 @@ public EmbeddedServletOptions(ServletConfig config, ServletContext context) {
parseModificationTestInterval(modificationTestIntervalStr);
}

String ieClassId = config.getInitParameter("ieClassId");
if (ieClassId != null) {
this.ieClassId = ieClassId;
}

String classpath = config.getInitParameter("classpath");
if (classpath != null) {
this.classpath = classpath;
}

// START PWC 1.2 6311155
String sysClassPath = config.getInitParameter("com.sun.appserv.jsp.classpath");
if (sysClassPath != null) {
this.sysClassPath = sysClassPath;
// END PWC 1.2 6311155
}

/*
Expand Down
23 changes: 1 addition & 22 deletions src/main/java/org/glassfish/wasp/JspC.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* Copyright (c) 2022, 2022 Contributors to the Eclipse Foundation
* Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright 2004 The Apache Software Foundation
* Copyright (c) 2021 Contributors to the Eclipse Foundation
Expand Down Expand Up @@ -97,8 +98,6 @@
*/
public class JspC implements Options {

public static final String DEFAULT_IE_CLASS_ID = "clsid:8AD9C840-044E-11D1-B3E9-00805F499D93";

// Logger
private static Logger log = Logger.getLogger(JspC.class.getName());

Expand Down Expand Up @@ -156,7 +155,6 @@ public class JspC implements Options {
private boolean mappedFile;
private boolean poolingEnabled = true;
private File scratchDir;
private String ieClassId = DEFAULT_IE_CLASS_ID;
private String targetPackage;
private String targetClassName;
private String uriBase;
Expand Down Expand Up @@ -547,25 +545,6 @@ public void setDefaultBufferNone(boolean defaultBufferNone) {
this.defaultBufferNone = defaultBufferNone;
}

/**
* Sets the class-id value to be sent to Internet Explorer when using <code>&lt;jsp:plugin&gt;</code> tags.
*
* @param ieClassId Class-id value
*/
public void setIeClassId(String ieClassId) {
this.ieClassId = ieClassId;
}

/**
* Gets the class-id value that is sent to Internet Explorer when using <code>&lt;jsp:plugin&gt;</code> tags.
*
* @return Class-id value
*/
@Override
public String getIeClassId() {
return ieClassId;
}

@Override
public File getScratchDir() {
return scratchDir;
Expand Down
6 changes: 1 addition & 5 deletions src/main/java/org/glassfish/wasp/Options.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* Copyright (c) 2022, 2022 Contributors to the Eclipse Foundation
* Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright 2004 The Apache Software Foundation
*
Expand Down Expand Up @@ -88,11 +89,6 @@ public interface Options {
*/
boolean getTrimSpaces();

/**
* Class ID for use in the plugin tag when the browser is IE.
*/
String getIeClassId();

/**
* What is my scratch dir?
*/
Expand Down
10 changes: 9 additions & 1 deletion src/main/java/org/glassfish/wasp/compiler/Compiler.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/*
* Copyright (c) 2022, 2022 Contributors to the Eclipse Foundation.
* Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright 2004 The Apache Software Foundation
* Copyright (c) 2022 Contributors to the Eclipse Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -31,9 +33,9 @@
import java.util.logging.Level;
import java.util.logging.Logger;

import org.glassfish.wasp.WaspException;
import org.glassfish.wasp.JspCompilationContext;
import org.glassfish.wasp.Options;
import org.glassfish.wasp.WaspException;
import org.glassfish.wasp.servlet.JspServletWrapper;

/**
Expand Down Expand Up @@ -126,6 +128,11 @@ private void generateJava() throws Exception {
pageInfo.setELIgnored(JspUtil.booleanValue(jspProperty.isELIgnored()));
pageInfo.setScriptingInvalid(JspUtil.booleanValue(jspProperty.isScriptingInvalid()));
pageInfo.setTrimDirectiveWhitespaces(JspUtil.booleanValue(jspProperty.getTrimSpaces()));

if (jspProperty.getErrorOnELNotFound() != null) {
pageInfo.setErrorOnELNotFound(JspUtil.booleanValue(jspProperty.getErrorOnELNotFound()));
}

pageInfo.setDeferredSyntaxAllowedAsLiteral(JspUtil.booleanValue(jspProperty.getPoundAllowed()));
pageInfo.setErrorOnUndeclaredNamespace(JspUtil.booleanValue(jspProperty.errorOnUndeclaredNamespace()));

Expand Down Expand Up @@ -551,6 +558,7 @@ public boolean isOutDated(boolean checkClass) {
URLConnection includeUconn = includeUrl.openConnection();
long includeLastModified = 0;
if (includeUconn instanceof JarURLConnection) {
includeUconn.setUseCaches(false);
includeLastModified = ((JarURLConnection) includeUconn).getJarEntry().getTime();
} else {
includeLastModified = includeUconn.getLastModified();
Expand Down
Loading

0 comments on commit e569c34

Please # to comment.