Skip to content

Commit 008a9e4

Browse files
noeargitee-org
authored andcommitted
!8 尝试为undertow适配Jsp,顺便升级jetty版本至最新
Merge pull request !8 from 小xu中年/dev
2 parents ebda8f6 + 52137e8 commit 008a9e4

File tree

15 files changed

+898
-86
lines changed

15 files changed

+898
-86
lines changed

solon-jakarta-parent/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
<cxf.version>4.1.2</cxf.version>
3131

32-
<jetty.jakarta.version>12.1.1</jetty.jakarta.version>
32+
<jetty.jakarta.version>12.1.4</jetty.jakarta.version>
3333

3434
<undertow.jakarta.version>2.3.20.Final</undertow.jakarta.version>
3535
<undertow.jastow.jakarta.version>2.2.8.Final</undertow.jastow.jakarta.version>

solon-jakarta-projects/solon-server/solon-server-undertow-jakarta/pom.xml

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,18 @@
5252

5353
<!-- server core end -->
5454
<!--jsp-->
55-
<!--<dependency>
55+
<dependency>
5656
<groupId>org.mortbay.jasper</groupId>
5757
<artifactId>mortbay-apache-jsp</artifactId>
5858
<version>11.0.10.1</version>
5959
<scope>provided</scope>
60-
</dependency>-->
60+
</dependency>
6161
<!--<dependency>
6262
<groupId>org.jboss.spec.javax.servlet</groupId>
6363
<artifactId>jboss-servlet-api_4.0_spec</artifactId>
6464
<version>2.0.0.Final</version>
6565
</dependency>-->
66-
<dependency>
66+
<!--<dependency>
6767
<groupId>io.undertow.jastow</groupId>
6868
<artifactId>jastow</artifactId>
6969
<version>${undertow.jastow.jakarta.version}</version>
@@ -82,7 +82,7 @@
8282
</exclusion>
8383
</exclusions>
8484
<scope>provided</scope>
85-
</dependency>
85+
</dependency>-->
8686
<!--<dependency>
8787
<groupId>org.jboss.metadata</groupId>
8888
<artifactId>jboss-metadata-common</artifactId>
@@ -101,30 +101,24 @@
101101
<version>3.43.0</version>
102102
<scope>provided</scope>
103103
</dependency>
104-
<!--<dependency>
104+
<dependency>
105105
<groupId>jakarta.el</groupId>
106106
<artifactId>jakarta.el-api</artifactId>
107107
<version>6.0.1</version>
108108
<scope>provided</scope>
109-
</dependency>-->
110-
<dependency>
109+
</dependency>
110+
<!--<dependency>
111111
<groupId>org.glassfish.expressly</groupId>
112112
<artifactId>expressly</artifactId>
113113
<version>6.0.0</version>
114114
<scope>provided</scope>
115-
</dependency>
115+
</dependency>-->
116116
<dependency>
117117
<groupId>jakarta.servlet.jsp.jstl</groupId>
118118
<artifactId>jakarta.servlet.jsp.jstl-api</artifactId>
119119
<version>3.0.2</version>
120120
<scope>provided</scope>
121121
</dependency>
122-
<dependency>
123-
<groupId>com.sun.el</groupId>
124-
<artifactId>el-ri</artifactId>
125-
<version>3.0.4</version>
126-
<scope>provided</scope>
127-
</dependency>
128122
<dependency>
129123
<groupId>jakarta.servlet.jsp</groupId>
130124
<artifactId>jakarta.servlet.jsp-api</artifactId>
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
package io.undertow.jsp;
2+
3+
import org.apache.tomcat.InstanceManager;
4+
5+
import javax.naming.NamingException;
6+
import java.lang.reflect.InvocationTargetException;
7+
8+
/**
9+
*
10+
* InstanceManager is evil and needs to go away
11+
*
12+
* @author Stuart Douglas
13+
*/
14+
public class HackInstanceManager implements InstanceManager {
15+
@Override
16+
public Object newInstance(final String className) throws IllegalAccessException, InvocationTargetException, NamingException, InstantiationException, ClassNotFoundException {
17+
return newInstance(Class.forName(className, false, Thread.currentThread().getContextClassLoader()));
18+
}
19+
20+
@Override
21+
public Object newInstance(final String fqcn, final ClassLoader classLoader) throws IllegalAccessException, InvocationTargetException, NamingException, InstantiationException, ClassNotFoundException {
22+
return classLoader.loadClass(fqcn).newInstance();
23+
}
24+
25+
@Override
26+
public Object newInstance(final Class<?> c) throws IllegalAccessException, InvocationTargetException, NamingException, InstantiationException {
27+
return c.newInstance();
28+
}
29+
30+
@Override
31+
public void newInstance(final Object o) throws IllegalAccessException, InvocationTargetException, NamingException {
32+
33+
}
34+
35+
@Override
36+
public void destroyInstance(final Object o) throws IllegalAccessException, InvocationTargetException {
37+
38+
}
39+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
package org.apache.jasper.deploy;
19+
20+
public class FunctionInfo {
21+
22+
protected String description;
23+
protected String name;
24+
protected String functionClass;
25+
protected String functionSignature;
26+
27+
public String getName() {
28+
return name;
29+
}
30+
public void setName(String name) {
31+
this.name = name;
32+
}
33+
public String getFunctionClass() {
34+
return functionClass;
35+
}
36+
public void setFunctionClass(String functionClass) {
37+
this.functionClass = functionClass;
38+
}
39+
public String getFunctionSignature() {
40+
return functionSignature;
41+
}
42+
public void setFunctionSignature(String functionSignature) {
43+
this.functionSignature = functionSignature;
44+
}
45+
public String getDescription() {
46+
return description;
47+
}
48+
public void setDescription(String description) {
49+
this.description = description;
50+
}
51+
52+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
/*
2+
* JBoss, Home of Professional Open Source.
3+
* Copyright 2012 Red Hat, Inc., and individual contributors
4+
* as indicated by the @author tags.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
package org.apache.jasper.deploy;
20+
21+
import java.io.Serializable;
22+
import java.util.ArrayList;
23+
24+
import jakarta.servlet.descriptor.JspPropertyGroupDescriptor;
25+
26+
public class JspPropertyGroup implements Serializable, JspPropertyGroupDescriptor {
27+
28+
protected ArrayList<String> urlPatterns = new ArrayList<String>();
29+
protected String elIgnored = null;
30+
protected String pageEncoding = null;
31+
protected String scriptingInvalid = null;
32+
protected String isXml = null;
33+
protected ArrayList<String> includePreludes = new ArrayList<String>();
34+
protected ArrayList<String> includeCodas = new ArrayList<String>();
35+
protected String deferredSyntaxAllowedAsLiteral = null;
36+
protected String trimDirectiveWhitespaces = null;
37+
protected String defaultContentType = null;
38+
protected String buffer = null;
39+
protected String errorOnUndeclaredNamespace = null;
40+
41+
public void addUrlPattern(String urlPattern) {
42+
urlPatterns.add(urlPattern);
43+
}
44+
public String getPageEncoding() {
45+
return pageEncoding;
46+
}
47+
public void setPageEncoding(String pageEncoding) {
48+
this.pageEncoding = pageEncoding;
49+
}
50+
public void addIncludePrelude(String includePrelude) {
51+
includePreludes.add(includePrelude);
52+
}
53+
public void addIncludeCoda(String includeCoda) {
54+
includeCodas.add(includeCoda);
55+
}
56+
public String getDefaultContentType() {
57+
return defaultContentType;
58+
}
59+
public void setDefaultContentType(String defaultContentType) {
60+
this.defaultContentType = defaultContentType;
61+
}
62+
public String getBuffer() {
63+
return buffer;
64+
}
65+
public void setBuffer(String buffer) {
66+
this.buffer = buffer;
67+
}
68+
public String getElIgnored() {
69+
return elIgnored;
70+
}
71+
72+
private Boolean errorOnELNotFound = null;
73+
public void setErrorOnELNotFound(String errorOnELNotFound) {
74+
this.errorOnELNotFound = Boolean.valueOf(errorOnELNotFound);
75+
}
76+
public String getErrorOnELNotFound() { return errorOnELNotFound == null ? "" : errorOnELNotFound.toString(); }
77+
78+
public void setElIgnored(String elIgnored) {
79+
this.elIgnored = elIgnored;
80+
}
81+
public String getScriptingInvalid() {
82+
return scriptingInvalid;
83+
}
84+
public void setScriptingInvalid(String scriptingInvalid) {
85+
this.scriptingInvalid = scriptingInvalid;
86+
}
87+
public String getIsXml() {
88+
return isXml;
89+
}
90+
public void setIsXml(String isXml) {
91+
this.isXml = isXml;
92+
}
93+
public String getDeferredSyntaxAllowedAsLiteral() {
94+
return deferredSyntaxAllowedAsLiteral;
95+
}
96+
public void setDeferredSyntaxAllowedAsLiteral(
97+
String deferredSyntaxAllowedAsLiteral) {
98+
this.deferredSyntaxAllowedAsLiteral = deferredSyntaxAllowedAsLiteral;
99+
}
100+
public String getTrimDirectiveWhitespaces() {
101+
return trimDirectiveWhitespaces;
102+
}
103+
public void setTrimDirectiveWhitespaces(String trimDirectiveWhitespaces) {
104+
this.trimDirectiveWhitespaces = trimDirectiveWhitespaces;
105+
}
106+
public String getErrorOnUndeclaredNamespace() {
107+
return errorOnUndeclaredNamespace;
108+
}
109+
public void setErrorOnUndeclaredNamespace(String errorOnUndeclaredNamespace) {
110+
this.errorOnUndeclaredNamespace = errorOnUndeclaredNamespace;
111+
}
112+
public ArrayList<String> getUrlPatterns() {
113+
return urlPatterns;
114+
}
115+
public ArrayList<String> getIncludePreludes() {
116+
return includePreludes;
117+
}
118+
public ArrayList<String> getIncludeCodas() {
119+
return includeCodas;
120+
}
121+
122+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
package org.apache.jasper.deploy;
19+
20+
public class TagAttributeInfo {
21+
protected String name;
22+
protected String type;
23+
protected String reqTime;
24+
protected String required;
25+
/*
26+
* private fields for JSP 2.0
27+
*/
28+
protected String fragment;
29+
/*
30+
* private fields for JSP 2.1
31+
*/
32+
protected String description;
33+
protected String deferredValue;
34+
protected String deferredMethod;
35+
protected String expectedTypeName;
36+
protected String methodSignature;
37+
38+
public String getName() {
39+
return name;
40+
}
41+
public void setName(String name) {
42+
this.name = name;
43+
}
44+
public String getType() {
45+
return type;
46+
}
47+
public void setType(String type) {
48+
this.type = type;
49+
}
50+
public String getDescription() {
51+
return description;
52+
}
53+
public void setDescription(String description) {
54+
this.description = description;
55+
}
56+
public String getExpectedTypeName() {
57+
return expectedTypeName;
58+
}
59+
public void setExpectedTypeName(String expectedTypeName) {
60+
this.expectedTypeName = expectedTypeName;
61+
}
62+
public String getMethodSignature() {
63+
return methodSignature;
64+
}
65+
public void setMethodSignature(String methodSignature) {
66+
this.methodSignature = methodSignature;
67+
}
68+
public String getReqTime() {
69+
return reqTime;
70+
}
71+
public void setReqTime(String reqTime) {
72+
this.reqTime = reqTime;
73+
}
74+
public String getRequired() {
75+
return required;
76+
}
77+
public void setRequired(String required) {
78+
this.required = required;
79+
}
80+
public String getFragment() {
81+
return fragment;
82+
}
83+
public void setFragment(String fragment) {
84+
this.fragment = fragment;
85+
}
86+
public String getDeferredValue() {
87+
return deferredValue;
88+
}
89+
public void setDeferredValue(String deferredValue) {
90+
this.deferredValue = deferredValue;
91+
}
92+
public String getDeferredMethod() {
93+
return deferredMethod;
94+
}
95+
public void setDeferredMethod(String deferredMethod) {
96+
this.deferredMethod = deferredMethod;
97+
}
98+
99+
}

0 commit comments

Comments
 (0)