Compare commits
209 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 571c7eff0a | |||
| b9991b5cc9 | |||
| 2f66045037 | |||
| 7b84357686 | |||
| b8f7c4b2ff | |||
| e40703e8ad | |||
| 4f8cb5211f | |||
| b16ae04459 | |||
| 8c8bf6bc7d | |||
| 713fd3ba26 | |||
| d995b1a85e | |||
| 70b5d7c83e | |||
| b65005c72d | |||
| a3cc0422f9 | |||
| 089f620ea2 | |||
| 61d593620f | |||
| 31bdbfc27a | |||
| 1b8e7ac824 | |||
| e3624835f0 | |||
| c801c8a741 | |||
| ead66f2f75 | |||
| 4944f1838f | |||
| e2d5cc2bd7 | |||
| 6cebeaca94 | |||
| a7145d695e | |||
| 28a68676ec | |||
| 1057d4149b | |||
| d1d02c1507 | |||
| 28ea6d01c2 | |||
| 62eac8f58f | |||
| 5015ea0d90 | |||
| baab7dd36c | |||
| 831689b26f | |||
| 5d4ad83ccd | |||
| 85cf09b7d3 | |||
| d0204f3152 | |||
| 2352c68631 | |||
| af53f0d93b | |||
| 0a3b596648 | |||
| 549c3bc989 | |||
| 4acb0d16da | |||
| ce7671568b | |||
| 8b9173469c | |||
| aca2eb07ef | |||
| 964590c9a9 | |||
| e5e6145c36 | |||
| 4939d3cef8 | |||
| ca5e82309c | |||
| d3727070b8 | |||
| a35cfebf5a | |||
| c5d760ce58 | |||
| 45b06dd69c | |||
| 7edcac886b | |||
| f913c407e9 | |||
| d384c824bd | |||
| d1413b01c0 | |||
| f8fcdbde50 | |||
| ade8af3772 | |||
| caa34a4972 | |||
| e6d1f59de7 | |||
| 9afb24bdac | |||
| f0db577e99 | |||
| 245eb90aa8 | |||
| 737542a031 | |||
| 6db4c5150e | |||
| 9a30a9f955 | |||
| 11d84a26c3 | |||
| 84d350dace | |||
| e9e3c0a252 | |||
| d024ccdd5f | |||
| e2215c852d | |||
| e635b5973a | |||
| 51bf8de716 | |||
| d07792a40a | |||
| 3294ed08d1 | |||
| c37a6edb62 | |||
| ac9b9ad89d | |||
| b68b6ab7c6 | |||
| 8c161f431d | |||
| 77acd665ef | |||
| 54a7c7094f | |||
| 00533db153 | |||
| cd3389ab35 | |||
| 7c375cd0b5 | |||
| bfc5ddba22 | |||
| e7259ba001 | |||
| f055f4f67f | |||
| 95ba165ffd | |||
| 13bf91bf31 | |||
| 273eb1f6a9 | |||
| d8090ef9d8 | |||
| 3af5818559 | |||
| 89a4580f82 | |||
| 59992ba015 | |||
| 91fd7d0f20 | |||
| 2246ea06cd | |||
| 5d414d4a76 | |||
| daf5b5055d | |||
| 26bb35e6c5 | |||
| cd2bfee2d7 | |||
| 660f5376e0 | |||
| 51a173aa26 | |||
| 576c064695 | |||
| 938f8eadb9 | |||
| b087006a41 | |||
| 83874c3318 | |||
| 31a582eee5 | |||
| 19642a5e69 | |||
| e0f77c11b5 | |||
| 2009e58924 | |||
| 7f4c37b86a | |||
| 86d4a52017 | |||
| 94a4f559e9 | |||
| 5e187ad12e | |||
| 6ce1e9ea3e | |||
| 8b8de96b49 | |||
| 97dbdc1c90 | |||
| a20d26fc3d | |||
| 0fa8cdd3e2 | |||
| e6e0577995 | |||
| 60794037dd | |||
| 6f35c02fbf | |||
| bed0db3470 | |||
| b372ac9e9a | |||
| 8cd0dc9cc1 | |||
| 3f2b8c526b | |||
| e95a07fcf1 | |||
| c59ba68e11 | |||
| eb4387521e | |||
| 0e6d31729c | |||
| 94c166f228 | |||
| 147f0ca8a5 | |||
| 71c2fe0ef9 | |||
| 1295c59456 | |||
| 519b8bd98a | |||
| 7d835bfa44 | |||
| 8c906f3c81 | |||
| 2fe7a91bdd | |||
| df56821abb | |||
| baddd368c4 | |||
| 8b501aa212 | |||
| b8d07f422b | |||
| 79138e1853 | |||
| d20972c13f | |||
| 6e76a3abc8 | |||
| 72d07f838d | |||
| 712fa7fba2 | |||
| e9c6ce0199 | |||
| 48b8a3b54f | |||
| 38c51d255e | |||
| d36a76c950 | |||
| 730e5829d0 | |||
| ec6c96e16c | |||
| a9edf74798 | |||
| bafcccc3bf | |||
| 0b9ca66f50 | |||
| b52f18ced4 | |||
| b365b58e36 | |||
| bd6f347dbf | |||
| 06228a7297 | |||
| 2e0ba0873d | |||
| 72e1ff74fd | |||
| dba63742ab | |||
| ec8ac50b6f | |||
| 63828c0e8d | |||
| 6c0a97cfa2 | |||
| 7dd2e817e7 | |||
| 8fecaa2c30 | |||
| 143be3f173 | |||
| 92cc4f8597 | |||
| b21be75703 | |||
| 792357e6f5 | |||
| 0802707a39 | |||
| 85529bf0af | |||
| a7618112f3 | |||
| 14ecd5c7f2 | |||
| 2e6d912acf | |||
| 54564c9aad | |||
| 07792bd0e0 | |||
| 6ad0ad512d | |||
| 459fd74dc6 | |||
| 7525978325 | |||
| bbdeb2d459 | |||
| 380b157bef | |||
| 416dd7e22b | |||
| 37e1794678 | |||
| 0cee06f5ab | |||
| 54a9ef85e7 | |||
| fed840b6ac | |||
| 0566cc58c6 | |||
| 8726288bd5 | |||
| 42fed67a85 | |||
| 09feb9bf06 | |||
| 2e528eb66a | |||
| 697e18553b | |||
| 11284a0423 | |||
| 5341424744 | |||
| 841313ec1f | |||
| a5c139114c | |||
| 08c6693200 | |||
| 857c36c3c5 | |||
| 6dc2cba329 | |||
| 20eb2ebbf5 | |||
| 7eda1745a4 | |||
| 3a73c2ab2b | |||
| 0c35a6bf88 | |||
| eac1e0efa7 | |||
| 6d2eb2e020 | |||
| 2202e5fbbb |
@@ -17,7 +17,9 @@ name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
branches:
|
||||
- master
|
||||
- release/struts-7-0-x
|
||||
pull_request:
|
||||
|
||||
permissions:
|
||||
@@ -43,6 +45,12 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup Java JDK
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 17
|
||||
cache: 'maven'
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v3
|
||||
with:
|
||||
|
||||
@@ -20,6 +20,7 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- release/struts-7-0-x
|
||||
|
||||
permissions: read-all
|
||||
|
||||
@@ -33,7 +34,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
java: [ '8', '11', '17', '21' ]
|
||||
java: [ '17', '21' ]
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
@@ -20,7 +20,8 @@ on:
|
||||
schedule:
|
||||
- cron: "30 1 * * 6" # Weekly on Saturdays
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
branches:
|
||||
- master
|
||||
|
||||
permissions: read-all
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- release/struts-7-0-x
|
||||
|
||||
permissions: read-all
|
||||
|
||||
|
||||
@@ -92,7 +92,9 @@ pipeline {
|
||||
}
|
||||
stage('Build Source & JavaDoc') {
|
||||
when {
|
||||
branch 'release/struts-7-0-x'
|
||||
anyOf {
|
||||
branch 'master'; branch 'release/struts-7-0-x'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
dir("local-snapshots-dir/") {
|
||||
@@ -103,7 +105,9 @@ pipeline {
|
||||
}
|
||||
stage('Deploy Snapshot') {
|
||||
when {
|
||||
branch 'release/struts-7-0-x'
|
||||
anyOf {
|
||||
branch 'master'; branch 'release/struts-7-0-x'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
withCredentials([file(credentialsId: 'lukaszlenart-repository-access-token', variable: 'CUSTOM_SETTINGS')]) {
|
||||
@@ -113,86 +117,11 @@ pipeline {
|
||||
}
|
||||
stage('Upload nightlies') {
|
||||
when {
|
||||
branch 'release/struts-7-0-x'
|
||||
}
|
||||
steps {
|
||||
sh './mvnw -B package -DskipTests --no-transfer-progress'
|
||||
sshPublisher(publishers: [
|
||||
sshPublisherDesc(
|
||||
configName: 'Nightlies',
|
||||
transfers: [
|
||||
sshTransfer(
|
||||
remoteDirectory: '/struts/snapshot',
|
||||
removePrefix: 'assembly/target/assembly/out',
|
||||
sourceFiles: 'assembly/target/assembly/out/struts-*.zip',
|
||||
cleanRemote: true
|
||||
)
|
||||
],
|
||||
verbose: true
|
||||
)
|
||||
])
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
cleanWs deleteDirs: true, patterns: [[pattern: '**/target/**', type: 'INCLUDE']]
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('JDK 8') {
|
||||
agent {
|
||||
label 'ubuntu'
|
||||
}
|
||||
tools {
|
||||
jdk 'jdk_1.8_latest'
|
||||
maven 'maven_3_latest'
|
||||
}
|
||||
environment {
|
||||
MAVEN_OPTS = "-Xmx1024m"
|
||||
}
|
||||
stages {
|
||||
stage('Build') {
|
||||
steps {
|
||||
sh './mvnw -B clean install -DskipTests -DskipAssembly --no-transfer-progress'
|
||||
}
|
||||
}
|
||||
stage('Test') {
|
||||
steps {
|
||||
sh './mvnw -B verify --no-transfer-progress'
|
||||
}
|
||||
post {
|
||||
always {
|
||||
junit(testResults: '**/surefire-reports/*.xml', allowEmptyResults: true)
|
||||
junit(testResults: '**/failsafe-reports/*.xml', allowEmptyResults: true)
|
||||
anyOf {
|
||||
branch 'master'
|
||||
branch 'release/struts-7-0-x'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Build Source & JavaDoc') {
|
||||
when {
|
||||
branch 'master'
|
||||
}
|
||||
steps {
|
||||
dir("local-snapshots-dir/") {
|
||||
deleteDir()
|
||||
}
|
||||
sh './mvnw -B source:jar javadoc:jar -DskipTests -DskipAssembly --no-transfer-progress'
|
||||
}
|
||||
}
|
||||
stage('Deploy Snapshot') {
|
||||
when {
|
||||
branch 'master'
|
||||
}
|
||||
steps {
|
||||
withCredentials([file(credentialsId: 'lukaszlenart-repository-access-token', variable: 'CUSTOM_SETTINGS')]) {
|
||||
sh './mvnw -s \${CUSTOM_SETTINGS} deploy -DskipTests -DskipAssembly --no-transfer-progress'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Upload nightlies') {
|
||||
when {
|
||||
branch 'master'
|
||||
}
|
||||
steps {
|
||||
sh './mvnw -B package -DskipTests --no-transfer-progress'
|
||||
sshPublisher(publishers: [
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-parent</artifactId>
|
||||
<version>6.7.0-SNAPSHOT</version>
|
||||
<version>7.0.0-M9</version>
|
||||
</parent>
|
||||
<artifactId>struts2-apps</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
@@ -24,12 +24,12 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-apps</artifactId>
|
||||
<version>6.7.0-SNAPSHOT</version>
|
||||
<version>7.0.0-M9</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>struts2-rest-showcase</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<version>6.7.0-SNAPSHOT</version>
|
||||
<version>7.0.0-M9</version>
|
||||
<name>Struts 2 Rest Showcase Webapp</name>
|
||||
<description>Struts 2 Rest Showcase Example</description>
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>net.sourceforge.htmlunit</groupId>
|
||||
<groupId>org.htmlunit</groupId>
|
||||
<artifactId>htmlunit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
@@ -107,7 +107,7 @@
|
||||
<plugin>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-maven-plugin</artifactId>
|
||||
<version>9.4.46.v20220331</version>
|
||||
<version>11.0.18</version>
|
||||
<configuration>
|
||||
<stopKey>CTRL+C</stopKey>
|
||||
<stopPort>8999</stopPort>
|
||||
|
||||
@@ -18,31 +18,41 @@
|
||||
*/
|
||||
package it.org.apache.struts2.rest.example;
|
||||
|
||||
import net.sourceforge.jwebunit.junit.WebTestCase;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
public class GetOrdersTest extends WebTestCase {
|
||||
import static net.sourceforge.jwebunit.junit.JWebUnit.assertTextNotPresent;
|
||||
import static net.sourceforge.jwebunit.junit.JWebUnit.assertTextPresent;
|
||||
import static net.sourceforge.jwebunit.junit.JWebUnit.beginAt;
|
||||
import static net.sourceforge.jwebunit.junit.JWebUnit.getTestContext;
|
||||
|
||||
public class GetOrdersTest {
|
||||
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
getTestContext().setBaseUrl(ParameterUtils.getBaseUrl());
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testGetOrders() {
|
||||
beginAt("/orders/3");
|
||||
assertTextPresent("Bob");
|
||||
assertTextNotPresent("Sarah");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetOrdersInHtml() {
|
||||
beginAt("/orders/3.xhtml");
|
||||
assertTextPresent("Bob");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetOrdersInXml() {
|
||||
beginAt("/orders/3.xml");
|
||||
assertTextPresent("<clientName>Bob");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetOrdersInJson() {
|
||||
beginAt("/orders/3.json");
|
||||
assertTextPresent("\"clientName\":\"Bob\"");
|
||||
|
||||
@@ -18,15 +18,21 @@
|
||||
*/
|
||||
package it.org.apache.struts2.rest.example;
|
||||
|
||||
import net.sourceforge.jwebunit.junit.WebTestCase;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
public class ListOrdersTest extends WebTestCase {
|
||||
import static net.sourceforge.jwebunit.junit.JWebUnit.assertTextPresent;
|
||||
import static net.sourceforge.jwebunit.junit.JWebUnit.beginAt;
|
||||
import static net.sourceforge.jwebunit.junit.JWebUnit.getTestContext;
|
||||
|
||||
public class ListOrdersTest {
|
||||
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
getTestContext().setBaseUrl(ParameterUtils.getBaseUrl());
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testListOrders() {
|
||||
beginAt("/orders");
|
||||
assertTextPresent("Bob");
|
||||
@@ -34,6 +40,7 @@ public class ListOrdersTest extends WebTestCase {
|
||||
assertTextPresent("Jim");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testListOrdersInHtml() {
|
||||
beginAt("/orders.xhtml");
|
||||
assertTextPresent("Bob");
|
||||
@@ -41,6 +48,7 @@ public class ListOrdersTest extends WebTestCase {
|
||||
assertTextPresent("Jim");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testListOrdersInXml() {
|
||||
beginAt("/orders.xml");
|
||||
assertTextPresent("<clientName>Bob");
|
||||
@@ -48,6 +56,7 @@ public class ListOrdersTest extends WebTestCase {
|
||||
assertTextPresent("<clientName>Jim");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testListOrdersInJson() {
|
||||
beginAt("/orders.json");
|
||||
assertTextPresent("\"clientName\":\"Bob\"");
|
||||
|
||||
@@ -18,23 +18,37 @@
|
||||
*/
|
||||
package it.org.apache.struts2.rest.example;
|
||||
|
||||
import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException;
|
||||
import net.sourceforge.jwebunit.junit.WebTestCase;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
import org.apache.http.client.methods.HttpPost;
|
||||
import org.apache.http.entity.StringEntity;
|
||||
import org.apache.http.impl.client.CloseableHttpClient;
|
||||
import org.apache.http.impl.client.HttpClients;
|
||||
import org.htmlunit.FailingHttpStatusCodeException;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class PostOrderTest extends WebTestCase {
|
||||
import static net.sourceforge.jwebunit.junit.JWebUnit.assertLinkNotPresentWithText;
|
||||
import static net.sourceforge.jwebunit.junit.JWebUnit.assertTextFieldEquals;
|
||||
import static net.sourceforge.jwebunit.junit.JWebUnit.assertTextPresent;
|
||||
import static net.sourceforge.jwebunit.junit.JWebUnit.beginAt;
|
||||
import static net.sourceforge.jwebunit.junit.JWebUnit.getTestContext;
|
||||
import static net.sourceforge.jwebunit.junit.JWebUnit.setTextField;
|
||||
import static net.sourceforge.jwebunit.junit.JWebUnit.setWorkingForm;
|
||||
import static net.sourceforge.jwebunit.junit.JWebUnit.submit;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
public class PostOrderTest {
|
||||
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
getTestContext().setBaseUrl(ParameterUtils.getBaseUrl());
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testPostOrder() {
|
||||
beginAt("/orders/new");
|
||||
setWorkingForm(0);
|
||||
@@ -45,6 +59,7 @@ public class PostOrderTest extends WebTestCase {
|
||||
assertLinkNotPresentWithText("Back to Orders");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testPostOrderWithErrors() {
|
||||
beginAt("/orders/new");
|
||||
setWorkingForm(0);
|
||||
@@ -58,6 +73,7 @@ public class PostOrderTest extends WebTestCase {
|
||||
assertTextFieldEquals("amount", "321");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testPostOrderInHtml() {
|
||||
beginAt("/orders/new.xhtml");
|
||||
setWorkingForm(0);
|
||||
@@ -72,6 +88,7 @@ public class PostOrderTest extends WebTestCase {
|
||||
assertLinkNotPresentWithText("Back to Orders");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testPostOrderInXml() throws IOException {
|
||||
CloseableHttpClient client = HttpClients.createDefault();
|
||||
HttpPost httpPost = new HttpPost(ParameterUtils.getBaseUrl() + "/orders.xml");
|
||||
@@ -85,6 +102,7 @@ public class PostOrderTest extends WebTestCase {
|
||||
client.close();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testPostOrderInXmlWithBadData() throws IOException {
|
||||
CloseableHttpClient client = HttpClients.createDefault();
|
||||
HttpPost httpPost = new HttpPost(ParameterUtils.getBaseUrl() + "/orders.xml");
|
||||
@@ -98,6 +116,7 @@ public class PostOrderTest extends WebTestCase {
|
||||
client.close();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testPostOrderInJson() throws IOException {
|
||||
CloseableHttpClient client = HttpClients.createDefault();
|
||||
HttpPost httpPost = new HttpPost(ParameterUtils.getBaseUrl() + "/orders.json");
|
||||
@@ -108,6 +127,7 @@ public class PostOrderTest extends WebTestCase {
|
||||
client.close();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testPostOrderInJsonWithBadData() throws IOException {
|
||||
CloseableHttpClient client = HttpClients.createDefault();
|
||||
HttpPost httpPost = new HttpPost(ParameterUtils.getBaseUrl() + "/orders.json");
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-apps</artifactId>
|
||||
<version>6.7.0-SNAPSHOT</version>
|
||||
<version>7.0.0-M9</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>struts2-showcase</artifactId>
|
||||
@@ -58,11 +58,6 @@
|
||||
<artifactId>struts2-tiles-plugin</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-dwr-plugin</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-json-plugin</artifactId>
|
||||
@@ -99,8 +94,8 @@
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
<groupId>jakarta.servlet</groupId>
|
||||
<artifactId>jakarta.servlet-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -123,12 +118,9 @@
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>opensymphony</groupId>
|
||||
<artifactId>sitemesh</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.directwebremoting</groupId>
|
||||
<artifactId>dwr</artifactId>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-sitemesh2-jakarta</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -144,10 +136,10 @@
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>net.sourceforge.htmlunit</groupId>
|
||||
<artifactId>htmlunit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<groupId>org.htmlunit</groupId>
|
||||
<artifactId>htmlunit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- BeanValidation Example -->
|
||||
<dependency>
|
||||
@@ -160,6 +152,43 @@
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<?m2e ignore?>
|
||||
<id>copy-dependencies</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>copy</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${project.build.directory}/extraclasspath</outputDirectory>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-sitemesh2-jakarta</artifactId>
|
||||
<destFileName>struts2-sitemesh2-jakarta.jar</destFileName>
|
||||
</artifactItem>
|
||||
<artifactItem>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-velocity-tools-view-jakarta</artifactId>
|
||||
<destFileName>struts2-velocity-tools-view-jakarta.jar</destFileName>
|
||||
</artifactItem>
|
||||
<artifactItem>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-velocity-tools-jsp-jakarta</artifactId>
|
||||
<destFileName>struts2-velocity-tools-jsp-jakarta.jar</destFileName>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
<overWriteReleases>false</overWriteReleases>
|
||||
<overWriteSnapshots>false</overWriteSnapshots>
|
||||
<overWriteIfNewer>true</overWriteIfNewer>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-failsafe-plugin</artifactId>
|
||||
@@ -190,7 +219,7 @@
|
||||
<plugin>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-maven-plugin</artifactId>
|
||||
<version>9.4.46.v20220331</version>
|
||||
<version>11.0.18</version>
|
||||
<configuration>
|
||||
<stopKey>CTRL+C</stopKey>
|
||||
<stopPort>8999</stopPort>
|
||||
@@ -203,12 +232,17 @@
|
||||
<httpConnector>
|
||||
<port>8090</port>
|
||||
</httpConnector>
|
||||
<scanIntervalSeconds>10</scanIntervalSeconds>
|
||||
<scan>10</scan>
|
||||
<webAppSourceDirectory>${basedir}/src/main/webapp/</webAppSourceDirectory>
|
||||
<webAppConfig>
|
||||
<contextPath>/struts2-showcase</contextPath>
|
||||
<descriptor>${basedir}/src/main/webapp/WEB-INF/web.xml</descriptor>
|
||||
</webAppConfig>
|
||||
<webApp>
|
||||
<extraClasspath>
|
||||
${project.build.directory}/extraclasspath/struts2-sitemesh2-jakarta.jar,
|
||||
${project.build.directory}/extraclasspath/struts2-velocity-tools-view-jakarta.jar,
|
||||
${project.build.directory}/extraclasspath/struts2-velocity-tools-jsp-jakarta
|
||||
</extraClasspath>
|
||||
<contextPath>/struts2-showcase</contextPath>
|
||||
<descriptor>${basedir}/src/main/webapp/WEB-INF/web.xml</descriptor>
|
||||
</webApp>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
|
||||
@@ -46,8 +46,7 @@ public class Category {
|
||||
new Category(15, "Dojo"),
|
||||
new Category(16, "Prototype"),
|
||||
new Category(17, "Scriptaculous"),
|
||||
new Category(18, "OpenRico"),
|
||||
new Category(19, "DWR")));
|
||||
new Category(18, "OpenRico")));
|
||||
}
|
||||
|
||||
public static Category getById(long id) {
|
||||
|
||||
@@ -18,13 +18,13 @@
|
||||
*/
|
||||
package org.apache.struts2.showcase.async;
|
||||
|
||||
import javax.servlet.Filter;
|
||||
import javax.servlet.FilterChain;
|
||||
import javax.servlet.FilterConfig;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.ServletResponse;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.Filter;
|
||||
import jakarta.servlet.FilterChain;
|
||||
import jakarta.servlet.FilterConfig;
|
||||
import jakarta.servlet.ServletException;
|
||||
import jakarta.servlet.ServletRequest;
|
||||
import jakarta.servlet.ServletResponse;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
|
||||
@@ -25,9 +25,9 @@ import org.apache.logging.log4j.LogManager;
|
||||
import org.springframework.web.context.WebApplicationContext;
|
||||
import org.springframework.web.context.support.WebApplicationContextUtils;
|
||||
|
||||
import javax.servlet.http.HttpSession;
|
||||
import javax.servlet.http.HttpSessionEvent;
|
||||
import javax.servlet.http.HttpSessionListener;
|
||||
import jakarta.servlet.http.HttpSession;
|
||||
import jakarta.servlet.http.HttpSessionEvent;
|
||||
import jakarta.servlet.http.HttpSessionListener;
|
||||
|
||||
public class ChatSessionListener implements HttpSessionListener {
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@ import com.opensymphony.xwork2.util.ValueStack;
|
||||
import org.apache.struts2.views.freemarker.FreemarkerManager;
|
||||
import org.apache.struts2.views.freemarker.ScopesHashModel;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
|
||||
@@ -20,10 +20,10 @@
|
||||
*/
|
||||
package org.apache.struts2.showcase.servlet;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.ServletException;
|
||||
import jakarta.servlet.http.HttpServlet;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
|
||||
public class TestServlet extends HttpServlet {
|
||||
|
||||
@@ -25,7 +25,7 @@ import com.opensymphony.xwork2.util.ClassLoaderUtil;
|
||||
import org.apache.struts2.action.ServletContextAware;
|
||||
import org.apache.struts2.interceptor.parameter.StrutsParameter;
|
||||
|
||||
import javax.servlet.ServletContext;
|
||||
import jakarta.servlet.ServletContext;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
@@ -31,13 +31,13 @@ import org.apache.struts2.interceptor.validation.SkipValidation;
|
||||
import org.hibernate.validator.constraints.ScriptAssert;
|
||||
import org.hibernate.validator.constraints.URL;
|
||||
|
||||
import javax.validation.constraints.Email;
|
||||
import javax.validation.constraints.Max;
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Pattern;
|
||||
import javax.validation.constraints.Size;
|
||||
import jakarta.validation.constraints.Email;
|
||||
import jakarta.validation.constraints.Max;
|
||||
import jakarta.validation.constraints.Min;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Pattern;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import java.util.Date;
|
||||
|
||||
// <!-- START SNIPPET: beanValidationExample -->
|
||||
|
||||
@@ -21,9 +21,11 @@
|
||||
package org.apache.struts2.showcase.xslt;
|
||||
|
||||
import com.opensymphony.xwork2.ActionSupport;
|
||||
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.apache.struts2.action.ServletRequestAware;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
|
||||
|
||||
@@ -24,6 +24,9 @@
|
||||
"https://struts.apache.org/dtds/struts-6.0.dtd">
|
||||
|
||||
<struts>
|
||||
|
||||
<constant name="struts.multipart.maxSize" value="10240" />
|
||||
|
||||
<package name="fileupload" extends="struts-default" namespace="/fileupload">
|
||||
|
||||
<action name="upload" class="org.apache.struts2.showcase.fileupload.FileUploadAction" method="input">
|
||||
|
||||
@@ -47,12 +47,7 @@
|
||||
<result>/WEB-INF/validation/quiz-success.jsp</result>
|
||||
</action>
|
||||
|
||||
<action name="quizDwr" class="org.apache.struts2.showcase.validation.QuizAction">
|
||||
<result name="input">/WEB-INF/validation/quiz-dwr.jsp</result>
|
||||
<result>/WEB-INF/validation/quiz-success.jsp</result>
|
||||
</action>
|
||||
|
||||
<action name="quizClientCss" class="org.apache.struts2.showcase.validation.QuizAction">
|
||||
<action name="quizClientCss" class="org.apache.struts2.showcase.validation.QuizAction">
|
||||
<result name="input">/WEB-INF/validation/quiz-client-css.jsp</result>
|
||||
<result>/WEB-INF/validation/quiz-success.jsp</result>
|
||||
</action>
|
||||
|
||||
@@ -226,7 +226,6 @@
|
||||
<li><s:a href="%{storeMessageAcrossRequestExample}">Store across request using MessageStoreInterceptor (Example)</s:a></li>
|
||||
<li><s:a href="%{quizBasic}">Validation (basic)</s:a></li>
|
||||
<li><s:a href="%{quizClient}">Validation (client)</s:a></li>
|
||||
<li><s:a href="%{quizDwr}">Validation (DWR)</s:a></li>
|
||||
<li><s:a href="%{quizClientCss}">Validation (client using css_xhtml theme)</s:a></li>
|
||||
<li><s:a href="%{visitorValidatorUrl}">Visitor Validator</s:a></li>
|
||||
<li><s:a href="%{ajaxFormSubmitUrl}">AJAX Form Submit</s:a></li>
|
||||
|
||||
@@ -41,7 +41,8 @@
|
||||
<li>FileName: <s:property value="fileName" /></li>
|
||||
<li>Original FileName: <s:property value="originalName" /></li>
|
||||
<li>File: <s:property value="uploadedFile" /></li>
|
||||
<li>Caption:<s:property value="caption" /></li>
|
||||
<li>Size: <s:property value="uploadSize" /></li>
|
||||
<li>Caption: <s:property value="caption" /></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,92 +0,0 @@
|
||||
<!--
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
-->
|
||||
<%@ taglib prefix="s" uri="/struts-tags" %>
|
||||
|
||||
<!-- START SNIPPET: dwrValidation -->
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Struts2 Showcase - Validation - DWR</title>
|
||||
<s:head/>
|
||||
<s:script type='text/javascript' src='../dwr/engine.js'></s:script>
|
||||
<s:script type='text/javascript' src='../dwr/util.js'></s:script>
|
||||
<s:script type='text/javascript' src='../dwr/interface/validator.js'></s:script>
|
||||
<s:script type='text/javascript'>
|
||||
var dwrValidateReply = function(data) {
|
||||
var validationResult = '';
|
||||
for (index = 0; index < data.actionErrors.length; ++index) {
|
||||
validationResult += (data.actionErrors[index] + '. ');
|
||||
}
|
||||
for (index = 0; index < data.actionMessages.length; ++index) {
|
||||
validationResult += (data.actionMessages[index] + '. ');
|
||||
}
|
||||
if (typeof data.fieldErrors.name !== 'undefined') {
|
||||
for (index = 0; index < data.fieldErrors.name.length; ++index) {
|
||||
validationResult += (data.fieldErrors.name[index] + '. ');
|
||||
}
|
||||
}
|
||||
if (typeof data.fieldErrors.age !== 'undefined') {
|
||||
for (index = 0; index < data.fieldErrors.age.length; ++index) {
|
||||
validationResult += (data.fieldErrors.age[index] + '. ');
|
||||
}
|
||||
}
|
||||
if (validationResult === '') {
|
||||
$('form').submit();
|
||||
} else {
|
||||
dwr.util.setValue('validationResult', validationResult);
|
||||
}
|
||||
};
|
||||
function dwrFormValidation() {
|
||||
var postData = {};
|
||||
$('form').serializeArray().map(function (x) {
|
||||
postData[x.name] = x.value;
|
||||
});
|
||||
validator.doPost('/validation', 'quizDwr', postData, dwrValidateReply);
|
||||
return false;
|
||||
}
|
||||
</s:script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="page-header">
|
||||
<h1>DWR validation Example</h1>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<s:form method="post">
|
||||
<s:textfield label="Name" name="name"/>
|
||||
<s:textfield label="Age" name="age"/>
|
||||
<s:textfield label="Favorite color" name="answer"/>
|
||||
<s:submit cssClass="btn btn-primary" onClick="return dwrFormValidation()"/>
|
||||
</s:form>
|
||||
<div id="validationResult" class="errorMessage"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<!-- END SNIPPET: dwrValidation -->
|
||||
|
||||
@@ -98,16 +98,6 @@
|
||||
<listener-class>org.apache.struts2.dispatcher.listener.StrutsListener</listener-class>
|
||||
</listener>
|
||||
|
||||
<!-- SNIPPET START: dwr -->
|
||||
|
||||
<servlet>
|
||||
<servlet-name>dwr</servlet-name>
|
||||
<servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class>
|
||||
<init-param>
|
||||
<param-name>debug</param-name>
|
||||
<param-value>true</param-value>
|
||||
</init-param>
|
||||
</servlet>
|
||||
<servlet>
|
||||
<servlet-name>JspSupportServlet</servlet-name>
|
||||
<servlet-class>org.apache.struts2.views.JspSupportServlet</servlet-class>
|
||||
@@ -147,12 +137,7 @@
|
||||
<servlet-class>org.apache.struts2.showcase.servlet.TestServlet</servlet-class>
|
||||
</servlet>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>dwr</servlet-name>
|
||||
<url-pattern>/dwr/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>sitemesh-freemarker</servlet-name>
|
||||
<url-pattern>*.ftl</url-pattern>
|
||||
</servlet-mapping>
|
||||
@@ -172,8 +157,6 @@
|
||||
<url-pattern>/testServlet/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<!-- END SNIPPET: dwr -->
|
||||
|
||||
<!-- SNIPPET START: example.velocity.filter.chain
|
||||
<filter>
|
||||
<filter-name>struts-cleanup</filter-name>
|
||||
|
||||
@@ -20,12 +20,11 @@
|
||||
*/
|
||||
package it.org.apache.struts2.showcase;
|
||||
|
||||
import org.htmlunit.WebClient;
|
||||
import org.htmlunit.html.HtmlPage;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.gargoylesoftware.htmlunit.WebClient;
|
||||
import com.gargoylesoftware.htmlunit.html.HtmlPage;
|
||||
|
||||
public class ActionChainingTest {
|
||||
@Test
|
||||
public void test() throws Exception {
|
||||
|
||||
@@ -20,12 +20,11 @@
|
||||
*/
|
||||
package it.org.apache.struts2.showcase;
|
||||
|
||||
import org.htmlunit.WebClient;
|
||||
import org.htmlunit.html.HtmlPage;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.gargoylesoftware.htmlunit.WebClient;
|
||||
import com.gargoylesoftware.htmlunit.html.HtmlPage;
|
||||
|
||||
public class ActionTagExampleTest {
|
||||
@Test
|
||||
public void test() throws Exception {
|
||||
|
||||
@@ -18,16 +18,15 @@
|
||||
*/
|
||||
package it.org.apache.struts2.showcase;
|
||||
|
||||
import org.htmlunit.WebClient;
|
||||
import org.htmlunit.html.DomElement;
|
||||
import org.htmlunit.html.HtmlForm;
|
||||
import org.htmlunit.html.HtmlPage;
|
||||
import org.htmlunit.html.HtmlSubmitInput;
|
||||
import org.htmlunit.html.HtmlTextInput;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.gargoylesoftware.htmlunit.WebClient;
|
||||
import com.gargoylesoftware.htmlunit.html.DomElement;
|
||||
import com.gargoylesoftware.htmlunit.html.HtmlForm;
|
||||
import com.gargoylesoftware.htmlunit.html.HtmlPage;
|
||||
import com.gargoylesoftware.htmlunit.html.HtmlSubmitInput;
|
||||
import com.gargoylesoftware.htmlunit.html.HtmlTextInput;
|
||||
|
||||
public class AsyncTest {
|
||||
@Test
|
||||
public void testChatRoom() throws Exception {
|
||||
|
||||
@@ -20,15 +20,14 @@
|
||||
*/
|
||||
package it.org.apache.struts2.showcase;
|
||||
|
||||
import org.htmlunit.WebClient;
|
||||
import org.htmlunit.html.HtmlForm;
|
||||
import org.htmlunit.html.HtmlPage;
|
||||
import org.htmlunit.html.HtmlSubmitInput;
|
||||
import org.htmlunit.html.HtmlTextInput;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.gargoylesoftware.htmlunit.WebClient;
|
||||
import com.gargoylesoftware.htmlunit.html.HtmlForm;
|
||||
import com.gargoylesoftware.htmlunit.html.HtmlPage;
|
||||
import com.gargoylesoftware.htmlunit.html.HtmlSubmitInput;
|
||||
import com.gargoylesoftware.htmlunit.html.HtmlTextInput;
|
||||
|
||||
public class CRUDTest {
|
||||
@Test
|
||||
public void testCreate() throws Exception {
|
||||
|
||||
@@ -20,12 +20,11 @@
|
||||
*/
|
||||
package it.org.apache.struts2.showcase;
|
||||
|
||||
import org.htmlunit.WebClient;
|
||||
import org.htmlunit.html.HtmlPage;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.gargoylesoftware.htmlunit.WebClient;
|
||||
import com.gargoylesoftware.htmlunit.html.HtmlPage;
|
||||
|
||||
public class ComponentTagExampleTest {
|
||||
@Test
|
||||
public void test() throws Exception {
|
||||
|
||||
@@ -18,10 +18,10 @@
|
||||
*/
|
||||
package it.org.apache.struts2.showcase;
|
||||
|
||||
import com.gargoylesoftware.htmlunit.WebClient;
|
||||
import com.gargoylesoftware.htmlunit.html.HtmlForm;
|
||||
import com.gargoylesoftware.htmlunit.html.HtmlPage;
|
||||
import com.gargoylesoftware.htmlunit.html.HtmlSubmitInput;
|
||||
import org.htmlunit.WebClient;
|
||||
import org.htmlunit.html.HtmlForm;
|
||||
import org.htmlunit.html.HtmlPage;
|
||||
import org.htmlunit.html.HtmlSubmitInput;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -20,14 +20,13 @@
|
||||
*/
|
||||
package it.org.apache.struts2.showcase;
|
||||
|
||||
import org.htmlunit.WebClient;
|
||||
import org.htmlunit.html.HtmlForm;
|
||||
import org.htmlunit.html.HtmlPage;
|
||||
import org.htmlunit.html.HtmlSubmitInput;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.gargoylesoftware.htmlunit.WebClient;
|
||||
import com.gargoylesoftware.htmlunit.html.HtmlForm;
|
||||
import com.gargoylesoftware.htmlunit.html.HtmlPage;
|
||||
import com.gargoylesoftware.htmlunit.html.HtmlSubmitInput;
|
||||
|
||||
public class ConversionTest {
|
||||
@Test
|
||||
public void testList() throws Exception {
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
*/
|
||||
package it.org.apache.struts2.showcase;
|
||||
|
||||
import com.gargoylesoftware.htmlunit.WebClient;
|
||||
import com.gargoylesoftware.htmlunit.html.DomElement;
|
||||
import com.gargoylesoftware.htmlunit.html.HtmlPage;
|
||||
import org.htmlunit.WebClient;
|
||||
import org.htmlunit.html.DomElement;
|
||||
import org.htmlunit.html.HtmlPage;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
|
||||
@@ -20,15 +20,14 @@
|
||||
*/
|
||||
package it.org.apache.struts2.showcase;
|
||||
|
||||
import org.htmlunit.WebClient;
|
||||
import org.htmlunit.html.HtmlForm;
|
||||
import org.htmlunit.html.HtmlPage;
|
||||
import org.htmlunit.html.HtmlSubmitInput;
|
||||
import org.htmlunit.html.HtmlTextInput;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.gargoylesoftware.htmlunit.WebClient;
|
||||
import com.gargoylesoftware.htmlunit.html.HtmlForm;
|
||||
import com.gargoylesoftware.htmlunit.html.HtmlPage;
|
||||
import com.gargoylesoftware.htmlunit.html.HtmlSubmitInput;
|
||||
import com.gargoylesoftware.htmlunit.html.HtmlTextInput;
|
||||
|
||||
public class ExecAndWaitTest {
|
||||
@Test
|
||||
public void testNodelay() throws Exception {
|
||||
|
||||
@@ -24,12 +24,11 @@ import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.URL;
|
||||
|
||||
import org.htmlunit.Page;
|
||||
import org.htmlunit.WebClient;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.gargoylesoftware.htmlunit.Page;
|
||||
import com.gargoylesoftware.htmlunit.WebClient;
|
||||
|
||||
public class FileDownloadTest {
|
||||
@Test
|
||||
public void testImage() throws Exception {
|
||||
|
||||
@@ -18,36 +18,82 @@
|
||||
*/
|
||||
package it.org.apache.struts2.showcase;
|
||||
|
||||
import com.gargoylesoftware.htmlunit.WebClient;
|
||||
import com.gargoylesoftware.htmlunit.html.DomElement;
|
||||
import com.gargoylesoftware.htmlunit.html.HtmlFileInput;
|
||||
import com.gargoylesoftware.htmlunit.html.HtmlForm;
|
||||
import com.gargoylesoftware.htmlunit.html.HtmlInput;
|
||||
import com.gargoylesoftware.htmlunit.html.HtmlPage;
|
||||
import com.gargoylesoftware.htmlunit.html.HtmlSubmitInput;
|
||||
import org.junit.Assert;
|
||||
import org.htmlunit.WebClient;
|
||||
import org.htmlunit.html.HtmlFileInput;
|
||||
import org.htmlunit.html.HtmlForm;
|
||||
import org.htmlunit.html.HtmlInput;
|
||||
import org.htmlunit.html.HtmlPage;
|
||||
import org.htmlunit.html.HtmlSubmitInput;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileWriter;
|
||||
import java.security.SecureRandom;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
public class FileUploadTest {
|
||||
|
||||
@Test
|
||||
public void testEmptyFile() throws Exception {
|
||||
public void testSimpleFileUpload() throws Exception {
|
||||
try (final WebClient webClient = new WebClient()) {
|
||||
final HtmlPage page = webClient.getPage(ParameterUtils.getBaseUrl() + "/fileupload/doUpload.action");
|
||||
final HtmlForm form = page.getFormByName("doUpload");
|
||||
HtmlInput captionInput = form.getInputByName("caption");
|
||||
HtmlFileInput uploadInput = form.getInputByName("upload");
|
||||
captionInput.type("some caption");
|
||||
File tempFile = File.createTempFile("testEmptyFile", ".tmp");
|
||||
File tempFile = File.createTempFile("testEmptyFile", ".txt");
|
||||
tempFile.deleteOnExit();
|
||||
uploadInput.setValueAttribute(tempFile.getAbsolutePath());
|
||||
|
||||
try (FileWriter writer = new FileWriter(tempFile)) {
|
||||
writer.append("Some strings");
|
||||
writer.flush();
|
||||
}
|
||||
|
||||
uploadInput.setValue(tempFile.getAbsolutePath());
|
||||
final HtmlSubmitInput button = form.getInputByValue("Submit");
|
||||
final HtmlPage resultPage = button.click();
|
||||
DomElement errorMessage = resultPage.getFirstByXPath("//span[@class='errorMessage']");
|
||||
Assert.assertNotNull(errorMessage);
|
||||
Assert.assertEquals("File cannot be empty", errorMessage.getVisibleText());
|
||||
|
||||
String content = resultPage.getVisibleText();
|
||||
assertThat(content).contains(
|
||||
"ContentType: text/plain",
|
||||
"Original FileName: " + tempFile.getName(),
|
||||
"Caption: some caption",
|
||||
"Size: 12"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testUploadOverMaxSize() throws Exception {
|
||||
try (final WebClient webClient = new WebClient()) {
|
||||
final HtmlPage page = webClient.getPage(ParameterUtils.getBaseUrl() + "/fileupload/doUpload.action");
|
||||
final HtmlForm form = page.getFormByName("doUpload");
|
||||
HtmlInput captionInput = form.getInputByName("caption");
|
||||
HtmlFileInput uploadInput = form.getInputByName("upload");
|
||||
|
||||
captionInput.type("Large file");
|
||||
|
||||
File tempFile = File.createTempFile("testEmptyFile", ".txt");
|
||||
SecureRandom rng = new SecureRandom();
|
||||
tempFile.deleteOnExit();
|
||||
try (FileWriter writer = new FileWriter(tempFile)) {
|
||||
for (int i = 0; i < 10240; ++i) {
|
||||
String line = String.format("%s %s%n", rng.nextInt(), rng.nextInt());
|
||||
writer.append(line);
|
||||
}
|
||||
writer.flush();
|
||||
}
|
||||
|
||||
uploadInput.setValue(tempFile.getAbsolutePath());
|
||||
final HtmlSubmitInput button = form.getInputByValue("Submit");
|
||||
final HtmlPage resultPage = button.click();
|
||||
|
||||
String content = resultPage.getVisibleText();
|
||||
System.out.println(content);
|
||||
assertThat(content).contains(
|
||||
"Request exceeded allowed size limit! Max size allowed is: 10,240!"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,9 +20,9 @@
|
||||
*/
|
||||
package it.org.apache.struts2.showcase;
|
||||
|
||||
import com.gargoylesoftware.htmlunit.WebClient;
|
||||
import com.gargoylesoftware.htmlunit.html.DomElement;
|
||||
import com.gargoylesoftware.htmlunit.html.HtmlPage;
|
||||
import org.htmlunit.WebClient;
|
||||
import org.htmlunit.html.DomElement;
|
||||
import org.htmlunit.html.HtmlPage;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
|
||||
@@ -20,13 +20,12 @@
|
||||
*/
|
||||
package it.org.apache.struts2.showcase;
|
||||
|
||||
import org.htmlunit.WebClient;
|
||||
import org.htmlunit.html.DomElement;
|
||||
import org.htmlunit.html.HtmlPage;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.gargoylesoftware.htmlunit.WebClient;
|
||||
import com.gargoylesoftware.htmlunit.html.DomElement;
|
||||
import com.gargoylesoftware.htmlunit.html.HtmlPage;
|
||||
|
||||
public class FreeMarkerManagerTest {
|
||||
@Test
|
||||
public void testCustomManager() throws Exception {
|
||||
@@ -36,11 +35,11 @@ public class FreeMarkerManagerTest {
|
||||
|
||||
final DomElement date = page.getElementById("todaysDate");
|
||||
Assert.assertNotNull(date);
|
||||
Assert.assertTrue(date.asNormalizedText().length() > 0);
|
||||
Assert.assertFalse(date.asNormalizedText().isEmpty());
|
||||
|
||||
final DomElement time = page.getElementById("timeNow");
|
||||
Assert.assertNotNull(time);
|
||||
Assert.assertTrue(time.asNormalizedText().length() > 0);
|
||||
Assert.assertFalse(time.asNormalizedText().isEmpty());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,16 +18,15 @@
|
||||
*/
|
||||
package it.org.apache.struts2.showcase;
|
||||
|
||||
import org.htmlunit.FailingHttpStatusCodeException;
|
||||
import org.htmlunit.WebClient;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException;
|
||||
import com.gargoylesoftware.htmlunit.WebClient;
|
||||
|
||||
public class StaticContentTest {
|
||||
|
||||
@Test
|
||||
public void testInvalidRersources1() throws Exception {
|
||||
public void testInvalidResources1() throws Exception {
|
||||
try (final WebClient webClient = new WebClient()) {
|
||||
try {
|
||||
webClient.getPage(ParameterUtils.getBaseUrl() + "/struts..");
|
||||
@@ -40,7 +39,7 @@ public class StaticContentTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInvalidRersources2() throws Exception {
|
||||
public void testInvalidResources2() throws Exception {
|
||||
try (final WebClient webClient = new WebClient()) {
|
||||
try {
|
||||
webClient.getPage(ParameterUtils.getBaseUrl() + "/static/..%252f");
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
*/
|
||||
package it.org.apache.struts2.showcase;
|
||||
|
||||
import com.gargoylesoftware.htmlunit.WebClient;
|
||||
import com.gargoylesoftware.htmlunit.html.HtmlPage;
|
||||
import org.htmlunit.WebClient;
|
||||
import org.htmlunit.html.HtmlPage;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -20,18 +20,17 @@
|
||||
*/
|
||||
package it.org.apache.struts2.showcase;
|
||||
|
||||
import org.htmlunit.WebClient;
|
||||
import org.htmlunit.html.HtmlCheckBoxInput;
|
||||
import org.htmlunit.html.HtmlForm;
|
||||
import org.htmlunit.html.HtmlPage;
|
||||
import org.htmlunit.html.HtmlSelect;
|
||||
import org.htmlunit.html.HtmlSubmitInput;
|
||||
import org.htmlunit.html.HtmlTextArea;
|
||||
import org.htmlunit.html.HtmlTextInput;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.gargoylesoftware.htmlunit.WebClient;
|
||||
import com.gargoylesoftware.htmlunit.html.HtmlCheckBoxInput;
|
||||
import com.gargoylesoftware.htmlunit.html.HtmlForm;
|
||||
import com.gargoylesoftware.htmlunit.html.HtmlPage;
|
||||
import com.gargoylesoftware.htmlunit.html.HtmlSelect;
|
||||
import com.gargoylesoftware.htmlunit.html.HtmlSubmitInput;
|
||||
import com.gargoylesoftware.htmlunit.html.HtmlTextArea;
|
||||
import com.gargoylesoftware.htmlunit.html.HtmlTextInput;
|
||||
|
||||
public class UITagExampleTest {
|
||||
@Test
|
||||
public void testInputForm() throws Exception {
|
||||
|
||||
@@ -20,14 +20,13 @@
|
||||
*/
|
||||
package it.org.apache.struts2.showcase;
|
||||
|
||||
import org.htmlunit.WebClient;
|
||||
import org.htmlunit.html.HtmlForm;
|
||||
import org.htmlunit.html.HtmlPage;
|
||||
import org.htmlunit.html.HtmlSubmitInput;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.gargoylesoftware.htmlunit.WebClient;
|
||||
import com.gargoylesoftware.htmlunit.html.HtmlForm;
|
||||
import com.gargoylesoftware.htmlunit.html.HtmlPage;
|
||||
import com.gargoylesoftware.htmlunit.html.HtmlSubmitInput;
|
||||
|
||||
public class ValidationTest {
|
||||
@Test
|
||||
public void testFieldValidators() throws Exception {
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-parent</artifactId>
|
||||
<version>6.7.0-SNAPSHOT</version>
|
||||
<version>7.0.0-M9</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>struts2-assembly</artifactId>
|
||||
@@ -117,6 +117,7 @@
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<skipAssembly>false</skipAssembly>
|
||||
<descriptors>
|
||||
<descriptor>src/main/assembly/all.xml</descriptor>
|
||||
<descriptor>src/main/assembly/lib.xml</descriptor>
|
||||
@@ -126,8 +127,8 @@
|
||||
<descriptor>src/main/assembly/docs.xml</descriptor>
|
||||
</descriptors>
|
||||
<finalName>struts-${project.version}</finalName>
|
||||
<outputDirectory>target/assembly/out</outputDirectory>
|
||||
<workDirectory>target/assembly/work</workDirectory>
|
||||
<outputDirectory>${project.build.directory}/assembly/out</outputDirectory>
|
||||
<workDirectory>${project.build.directory}/assembly/work</workDirectory>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
@@ -165,11 +166,6 @@
|
||||
<artifactId>struts2-config-browser-plugin</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-dwr-plugin</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-jasperreports-plugin</artifactId>
|
||||
@@ -185,21 +181,6 @@
|
||||
<artifactId>struts2-junit-plugin</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-pell-multipart-plugin</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plexus-plugin</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-portlet-plugin</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-rest-plugin</artifactId>
|
||||
@@ -223,40 +204,9 @@
|
||||
<artifactId>struts2-tiles-plugin</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-oval-plugin</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-json-plugin</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-embeddedjsp-plugin</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-gxp-plugin</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-osgi-plugin</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-osgi-admin-bundle</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-osgi-demo-bundle</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
</project>
|
||||
|
||||
@@ -23,264 +23,210 @@
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd">
|
||||
|
||||
<id>all</id>
|
||||
<formats>
|
||||
<format>zip</format>
|
||||
</formats>
|
||||
<dependencySets>
|
||||
<dependencySet>
|
||||
<useProjectArtifact>false</useProjectArtifact>
|
||||
<outputDirectory>lib</outputDirectory>
|
||||
<scope>runtime</scope>
|
||||
<excludes>
|
||||
<exclude>junit:junit</exclude>
|
||||
<exclude>org.testng:testng</exclude>
|
||||
</excludes>
|
||||
</dependencySet>
|
||||
</dependencySets>
|
||||
<fileSets>
|
||||
<fileSet>
|
||||
<directory>src/main/resources</directory>
|
||||
<outputDirectory></outputDirectory>
|
||||
<includes>
|
||||
<include>README*</include>
|
||||
<include>LICENSE*</include>
|
||||
<include>NOTICE*</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../core/src/main/resources</directory>
|
||||
<outputDirectory></outputDirectory>
|
||||
<includes>
|
||||
<include>FREEMARKER-LICENSE.txt</include>
|
||||
<include>OGNL-LICENSE.txt</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/plexus/src/main/resources</directory>
|
||||
<outputDirectory></outputDirectory>
|
||||
<includes>
|
||||
<include>CLASSWORLDS-LICENSE.txt</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/rest/src/main/resources</directory>
|
||||
<outputDirectory></outputDirectory>
|
||||
<includes>
|
||||
<include>XSTREAM-LICENSE.txt</include>
|
||||
<include>XPP3-LICENSE.txt</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/sitemesh/src/main/resources</directory>
|
||||
<outputDirectory></outputDirectory>
|
||||
<includes>
|
||||
<include>SITEMESH-LICENSE.txt</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/oval/src/main/resources</directory>
|
||||
<outputDirectory></outputDirectory>
|
||||
<includes>
|
||||
<include>OVAL-LICENSE.txt</include>
|
||||
<include>XSTREAM-LICENSE.txt</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>target/apps</directory>
|
||||
<outputDirectory>apps</outputDirectory>
|
||||
<includes>
|
||||
<include>*.war</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<id>all</id>
|
||||
<formats>
|
||||
<format>zip</format>
|
||||
</formats>
|
||||
<dependencySets>
|
||||
<dependencySet>
|
||||
<useProjectArtifact>false</useProjectArtifact>
|
||||
<outputDirectory>lib</outputDirectory>
|
||||
<scope>runtime</scope>
|
||||
<excludes>
|
||||
<exclude>junit:junit</exclude>
|
||||
<exclude>org.testng:testng</exclude>
|
||||
</excludes>
|
||||
</dependencySet>
|
||||
</dependencySets>
|
||||
<fileSets>
|
||||
<fileSet>
|
||||
<directory>src/main/resources</directory>
|
||||
<outputDirectory></outputDirectory>
|
||||
<includes>
|
||||
<include>README*</include>
|
||||
<include>LICENSE*</include>
|
||||
<include>NOTICE*</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../core/src/main/resources</directory>
|
||||
<outputDirectory></outputDirectory>
|
||||
<includes>
|
||||
<include>FREEMARKER-LICENSE.txt</include>
|
||||
<include>OGNL-LICENSE.txt</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/rest/src/main/resources</directory>
|
||||
<outputDirectory></outputDirectory>
|
||||
<includes>
|
||||
<include>XSTREAM-LICENSE.txt</include>
|
||||
<include>XPP3-LICENSE.txt</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/sitemesh/src/main/resources</directory>
|
||||
<outputDirectory></outputDirectory>
|
||||
<includes>
|
||||
<include>SITEMESH-LICENSE.txt</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>target/apps</directory>
|
||||
<outputDirectory>apps</outputDirectory>
|
||||
<includes>
|
||||
<include>*.war</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
|
||||
<!-- Include the Struts 2 core Javadoc in the assembly -->
|
||||
<fileSet>
|
||||
<directory>../core/target/site</directory>
|
||||
<outputDirectory>docs/struts2-core</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../core/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-core-apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<!-- Include the Struts 2 core Javadoc in the assembly -->
|
||||
<fileSet>
|
||||
<directory>../core/target/site</directory>
|
||||
<outputDirectory>docs/struts2-core</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../core/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-core-apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
|
||||
<!-- Include the Confluence docs in the assembly -->
|
||||
<fileSet>
|
||||
<directory>target/docs</directory>
|
||||
<outputDirectory>docs/docs</outputDirectory>
|
||||
</fileSet>
|
||||
<!-- Include the Confluence docs in the assembly -->
|
||||
<fileSet>
|
||||
<directory>target/docs</directory>
|
||||
<outputDirectory>docs/docs</outputDirectory>
|
||||
</fileSet>
|
||||
|
||||
<!-- Plugins -->
|
||||
<!--
|
||||
<fileSet>
|
||||
<directory>../plugins/$plugin/target/site</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-$plugin-plugin</outputDirectory>
|
||||
</fileSet>
|
||||
-->
|
||||
<fileSet>
|
||||
<directory>../plugins/bean-validation/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-bean-validation/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/cdi/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-cdi-plugin/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/config-browser/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-config-browser-plugin/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/convention/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-convention-plugin/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/dwr/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-dwr-plugin/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/embeddedjsp/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-embeddedjsp-plugin/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/gxp/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-gxp-plugin/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/jasperreports/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-jasperreports-plugin/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/javatemplates/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-javatemplates-plugin/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/jfreechart/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-jfreechart-plugin/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/json/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-json-plugin/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/junit/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-junit-plugin/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/osgi/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-osgi-plugin/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/oval/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-oval-plugin/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/pell-multipart/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-pell-multipart-plugin/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/plexus/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-plexus-plugin/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/portlet/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-portlet-plugin/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/portlet-tiles/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-portlet-tiles-plugin/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/rest/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-rest-plugin/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/sitemesh/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-sitemesh-plugin/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/spring/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-spring-plugin/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/testng/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-testng-plugin/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/tiles/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-tiles-plugin/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/velocity/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-velocity-plugin/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<!-- Plugins -->
|
||||
<!--
|
||||
<fileSet>
|
||||
<directory>../plugins/$plugin/target/site</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-$plugin-plugin</outputDirectory>
|
||||
</fileSet>
|
||||
-->
|
||||
<fileSet>
|
||||
<directory>../plugins/async/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-async-validation/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/bean-validation/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-bean-validation/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/cdi/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-cdi-plugin/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/config-browser/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-config-browser-plugin/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/convention/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-convention-plugin/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/jasperreports/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-jasperreports-plugin/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/javatemplates/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-javatemplates-plugin/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/jfreechart/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-jfreechart-plugin/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/json/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-json-plugin/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/junit/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-junit-plugin/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/rest/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-rest-plugin/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/sitemesh/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-sitemesh-plugin/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/spring/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-spring-plugin/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/testng/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-testng-plugin/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/tiles/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-tiles-plugin/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/velocity/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-velocity-plugin/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/xslt/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-xslt-plugin/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
|
||||
<!-- bundles -->
|
||||
<fileSet>
|
||||
<directory>../bundles/admin/target/site</directory>
|
||||
<outputDirectory>docs/struts2-bundles/admin</outputDirectory>
|
||||
</fileSet>
|
||||
|
||||
<fileSet>
|
||||
<directory>../bundles/demo/target/site</directory>
|
||||
<outputDirectory>docs/struts2-bundles/demo</outputDirectory>
|
||||
</fileSet>
|
||||
|
||||
<!-- Include the source code in the assembly -->
|
||||
<fileSet>
|
||||
<directory>../</directory>
|
||||
<outputDirectory>src/</outputDirectory>
|
||||
<includes>
|
||||
<include>pom.xml</include>
|
||||
<include>src/</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../apps</directory>
|
||||
<outputDirectory>src/apps</outputDirectory>
|
||||
<includes>
|
||||
<include>pom.xml</include>
|
||||
<include>src/</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../apps/showcase</directory>
|
||||
<outputDirectory>src/apps/showcase</outputDirectory>
|
||||
<includes>
|
||||
<include>pom.xml</include>
|
||||
<include>src/</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../apps/rest-showcase</directory>
|
||||
<outputDirectory>src/apps/rest-showcase</outputDirectory>
|
||||
<includes>
|
||||
<include>pom.xml</include>
|
||||
<include>src/</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../assembly</directory>
|
||||
<outputDirectory>src/assembly</outputDirectory>
|
||||
<includes>
|
||||
<include>pom.xml</include>
|
||||
<include>src/</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../core</directory>
|
||||
<outputDirectory>src/core</outputDirectory>
|
||||
<includes>
|
||||
<include>pom.xml</include>
|
||||
<include>src/</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins</directory>
|
||||
<outputDirectory>src/plugins</outputDirectory>
|
||||
<excludes>
|
||||
<exclude>*/target/**</exclude>
|
||||
<exclude>target/**</exclude>
|
||||
</excludes>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
<!-- Include the source code in the assembly -->
|
||||
<fileSet>
|
||||
<directory>../</directory>
|
||||
<outputDirectory>src/</outputDirectory>
|
||||
<includes>
|
||||
<include>pom.xml</include>
|
||||
<include>src/</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../apps</directory>
|
||||
<outputDirectory>src/apps</outputDirectory>
|
||||
<includes>
|
||||
<include>pom.xml</include>
|
||||
<include>src/</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../apps/showcase</directory>
|
||||
<outputDirectory>src/apps/showcase</outputDirectory>
|
||||
<includes>
|
||||
<include>pom.xml</include>
|
||||
<include>src/</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../apps/rest-showcase</directory>
|
||||
<outputDirectory>src/apps/rest-showcase</outputDirectory>
|
||||
<includes>
|
||||
<include>pom.xml</include>
|
||||
<include>src/</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../assembly</directory>
|
||||
<outputDirectory>src/assembly</outputDirectory>
|
||||
<includes>
|
||||
<include>pom.xml</include>
|
||||
<include>src/</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../core</directory>
|
||||
<outputDirectory>src/core</outputDirectory>
|
||||
<includes>
|
||||
<include>pom.xml</include>
|
||||
<include>src/</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins</directory>
|
||||
<outputDirectory>src/plugins</outputDirectory>
|
||||
<excludes>
|
||||
<exclude>*/target/**</exclude>
|
||||
<exclude>target/**</exclude>
|
||||
</excludes>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
</assembly>
|
||||
|
||||
@@ -52,13 +52,6 @@
|
||||
<include>OGNL-LICENSE.txt</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/plexus/src/main/resources</directory>
|
||||
<outputDirectory></outputDirectory>
|
||||
<includes>
|
||||
<include>CLASSWORLDS-LICENSE.txt</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/rest/src/main/resources</directory>
|
||||
<outputDirectory></outputDirectory>
|
||||
|
||||
@@ -29,12 +29,6 @@
|
||||
</formats>
|
||||
<fileSets>
|
||||
|
||||
<!-- Include the XWork Javadoc in the assembly -->
|
||||
<fileSet>
|
||||
<directory>../xwork-core/target/apidocs</directory>
|
||||
<outputDirectory>docs/xwork-core/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
|
||||
<!-- Include the website in the assembly -->
|
||||
<fileSet>
|
||||
<directory>../target/site</directory>
|
||||
@@ -52,6 +46,10 @@
|
||||
</fileSet>
|
||||
|
||||
<!-- Plugins -->
|
||||
<fileSet>
|
||||
<directory>../plugins/async/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-async/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/bean-validation/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-bean-validation/apidocs</outputDirectory>
|
||||
@@ -68,18 +66,6 @@
|
||||
<directory>../plugins/convention/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-convention-plugin/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/dwr/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-dwr-plugin/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/embeddedjsp/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-embeddedjsp-plugin/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/gxp/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-gxp-plugin/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/jasperreports/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-jasperreports-plugin/apidocs</outputDirectory>
|
||||
@@ -100,30 +86,6 @@
|
||||
<directory>../plugins/junit/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-junit-plugin/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/osgi/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-osgi-plugin/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/oval/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-oval-plugin/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/pell-multipart/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-pell-multipart-plugin/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/plexus/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-plexus-plugin/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/portlet/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-portlet-plugin/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/portlet-tiles/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-portlet-tiles-plugin/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/rest/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-rest-plugin/apidocs</outputDirectory>
|
||||
@@ -144,6 +106,14 @@
|
||||
<directory>../plugins/tiles/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-tiles-plugin/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/velocity/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-velocity-plugin/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/xslt/target/apidocs</directory>
|
||||
<outputDirectory>docs/struts2-plugins/struts2-xslt-plugin/apidocs</outputDirectory>
|
||||
</fileSet>
|
||||
|
||||
</fileSets>
|
||||
</assembly>
|
||||
|
||||
@@ -56,13 +56,6 @@
|
||||
<include>OGNL-LICENSE.txt</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/plexus/src/main/resources</directory>
|
||||
<outputDirectory></outputDirectory>
|
||||
<includes>
|
||||
<include>CLASSWORLDS-LICENSE.txt</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/rest/src/main/resources</directory>
|
||||
<outputDirectory></outputDirectory>
|
||||
@@ -78,13 +71,5 @@
|
||||
<include>SITEMESH-LICENSE.txt</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../plugins/oval/src/main/resources</directory>
|
||||
<outputDirectory></outputDirectory>
|
||||
<includes>
|
||||
<include>OVAL-LICENSE.txt</include>
|
||||
<include>XSTREAM-LICENSE.txt</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
</assembly>
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
<include>org.apache.commons:commons-text</include>
|
||||
<include>org.apache.logging.log4j:log4j-api</include>
|
||||
<include>ognl:ognl</include>
|
||||
<include>commons-fileupload:commons-fileupload</include>
|
||||
<include>org.apache.commons:commons-fileupload2-jakarta</include>
|
||||
<include>org.apache.commons:commons-io</include>
|
||||
<include>com.github.ben-manes.caffeine:caffeine</include>
|
||||
<include>org.javassist:javassist</include>
|
||||
|
||||
@@ -48,14 +48,6 @@
|
||||
<include>src/</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../api</directory>
|
||||
<outputDirectory>src/api</outputDirectory>
|
||||
<includes>
|
||||
<include>pom.xml</include>
|
||||
<include>src/</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../apps</directory>
|
||||
<outputDirectory>src/apps</outputDirectory>
|
||||
@@ -107,14 +99,6 @@
|
||||
<exclude>*.iws</exclude>
|
||||
</excludes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>../bundles</directory>
|
||||
<outputDirectory>src/bundles</outputDirectory>
|
||||
<excludes>
|
||||
<exclude>*/target/**</exclude>
|
||||
<exclude>target/**</exclude>
|
||||
</excludes>
|
||||
</fileSet>
|
||||
|
||||
</fileSets>
|
||||
</assembly>
|
||||
|
||||
@@ -25,11 +25,11 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-parent</artifactId>
|
||||
<version>6.7.0-SNAPSHOT</version>
|
||||
<version>7.0.0-M9</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>struts2-bom</artifactId>
|
||||
<version>6.7.0-SNAPSHOT</version>
|
||||
<version>7.0.0-M9</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>Struts 2 Bill of Materials</name>
|
||||
@@ -44,7 +44,7 @@
|
||||
</licenses>
|
||||
|
||||
<properties>
|
||||
<struts-version.version>6.7.0-SNAPSHOT</struts-version.version>
|
||||
<struts-version.version>7.0.0-M9</struts-version.version>
|
||||
<maven.site.skip>true</maven.site.skip>
|
||||
<maven.site.deploy.skip>true</maven.site.deploy.skip>
|
||||
</properties>
|
||||
@@ -81,11 +81,6 @@
|
||||
<artifactId>struts2-config-browser-plugin</artifactId>
|
||||
<version>${struts-version.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-dwr-plugin</artifactId>
|
||||
<version>${struts-version.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-embeddedjsp-plugin</artifactId>
|
||||
@@ -126,31 +121,11 @@
|
||||
<artifactId>struts2-osgi-plugin</artifactId>
|
||||
<version>${struts-version.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-oval-plugin</artifactId>
|
||||
<version>${struts-version.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-pell-multipart-plugin</artifactId>
|
||||
<version>${struts-version.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-plexus-plugin</artifactId>
|
||||
<version>${struts-version.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-portlet-plugin</artifactId>
|
||||
<version>${struts-version.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-portlet-tiles-plugin</artifactId>
|
||||
<version>${struts-version.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-rest-plugin</artifactId>
|
||||
@@ -190,7 +165,7 @@
|
||||
</dependencyManagement>
|
||||
|
||||
<scm>
|
||||
<tag>STRUTS_6_3_0_1</tag>
|
||||
<tag>STRUTS_7_0_0_M9</tag>
|
||||
<connection>scm:git:https://gitbox.apache.org/repos/asf/struts.git</connection>
|
||||
<developerConnection>scm:git:https://gitbox.apache.org/repos/asf/struts.git</developerConnection>
|
||||
<url>https://github.com/apache/struts/</url>
|
||||
|
||||
@@ -1,216 +0,0 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package org.apache.struts2.osgi.admin.actions;
|
||||
|
||||
import com.opensymphony.xwork2.ActionSupport;
|
||||
import com.opensymphony.xwork2.config.Configuration;
|
||||
import com.opensymphony.xwork2.config.entities.PackageConfig;
|
||||
import com.opensymphony.xwork2.inject.Inject;
|
||||
import org.apache.struts2.action.ServletContextAware;
|
||||
import org.apache.struts2.interceptor.parameter.StrutsParameter;
|
||||
import org.apache.struts2.osgi.BundleAccessor;
|
||||
import org.apache.struts2.osgi.StrutsOsgiListener;
|
||||
import org.apache.struts2.osgi.host.OsgiHost;
|
||||
import org.osgi.framework.Bundle;
|
||||
import org.osgi.framework.BundleException;
|
||||
|
||||
import javax.servlet.ServletContext;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class BundlesAction extends ActionSupport implements ServletContextAware {
|
||||
|
||||
private String id;
|
||||
|
||||
private BundleAccessor bundleAccessor;
|
||||
private Configuration configuration;
|
||||
private OsgiHost osgiHost;
|
||||
|
||||
public BundlesAction() {
|
||||
}
|
||||
|
||||
public String index() {
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
public String view() {
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
public String start() throws BundleException {
|
||||
clearErrorsAndMessages();
|
||||
addActionMessage("Start - OSGi Host: " + osgiHost + ", ID: " + id);
|
||||
|
||||
Bundle bundle = osgiHost.getBundles().get(id);
|
||||
try {
|
||||
bundle.start();
|
||||
|
||||
//start() fires a BundleEvent.STARTED, which loads the config
|
||||
//we need to wait until the config is loaded from that bundle but
|
||||
//there no easy way/elegant way to know if the bundle was processed already
|
||||
Thread.sleep(1000);
|
||||
} catch (Exception e) {
|
||||
addActionError("Exception: " + e.toString() + " (" + e.getMessage() + ")");
|
||||
}
|
||||
|
||||
return view();
|
||||
}
|
||||
|
||||
public String stop() throws BundleException {
|
||||
clearErrorsAndMessages();
|
||||
addActionMessage("Stop - OSGi Host: " + osgiHost + ", ID: " + id);
|
||||
|
||||
Bundle bundle = osgiHost.getBundles().get(id);
|
||||
try {
|
||||
bundle.stop();
|
||||
} catch (Exception e) {
|
||||
addActionError("Exception: " + e.toString() + " (" + e.getMessage() + ")");
|
||||
}
|
||||
|
||||
return view();
|
||||
}
|
||||
|
||||
public String update() throws BundleException {
|
||||
clearErrorsAndMessages();
|
||||
addActionMessage("Update - OSGi Host: " + osgiHost + ", ID: " + id);
|
||||
|
||||
Bundle bundle = osgiHost.getBundles().get(id);
|
||||
try {
|
||||
bundle.update();
|
||||
} catch (Exception e) {
|
||||
addActionError("Exception: " + e.toString() + " (" + e.getMessage() + ")");
|
||||
}
|
||||
|
||||
return view();
|
||||
}
|
||||
|
||||
public boolean isStrutsEnabled(Bundle bundle) {
|
||||
return "true".equalsIgnoreCase((String) bundle.getHeaders().get(OsgiHost.OSGI_HEADER_STRUTS_ENABLED));
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@StrutsParameter
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Bundle getBundle() {
|
||||
return osgiHost.getBundles().get(id);
|
||||
}
|
||||
|
||||
public List<PackageConfig> getPackages() {
|
||||
List<PackageConfig> pkgs = new ArrayList<>();
|
||||
Bundle bundle = getBundle();
|
||||
if (bundle.getState() == Bundle.ACTIVE) {
|
||||
bundleAccessor.getPackagesByBundle(bundle).stream().map(
|
||||
name -> configuration.getPackageConfig(name)).filter(
|
||||
packageConfig -> (packageConfig != null)).forEachOrdered(packageConfig -> {
|
||||
pkgs.add(packageConfig);
|
||||
});
|
||||
}
|
||||
return pkgs;
|
||||
}
|
||||
|
||||
public ArrayList<String> getHeaderKeys() {
|
||||
return Collections.list(getBundle().getHeaders().keys());
|
||||
}
|
||||
|
||||
public Collection<Bundle> getBundles() {
|
||||
List<Bundle> bundles = new ArrayList(osgiHost.getBundles().values());
|
||||
Collections.sort(bundles, (Bundle bundle1, Bundle bundle2) -> {
|
||||
boolean bundle1StrutsEnabled = isStrutsEnabled(bundle1);
|
||||
boolean bundle2StrutsEnabled = isStrutsEnabled(bundle2);
|
||||
|
||||
if ((bundle1StrutsEnabled && bundle2StrutsEnabled) || (!bundle1StrutsEnabled && !bundle2StrutsEnabled)) {
|
||||
return bundle1.getSymbolicName().compareTo(bundle2.getSymbolicName());
|
||||
} else {
|
||||
return bundle1StrutsEnabled ? -1 : 1;
|
||||
}
|
||||
});
|
||||
return bundles;
|
||||
}
|
||||
|
||||
public String displayProperty(Object obj) {
|
||||
if (obj.getClass().isArray()) {
|
||||
return Arrays.asList((Object[])obj).toString();
|
||||
} else {
|
||||
return obj.toString();
|
||||
}
|
||||
}
|
||||
|
||||
public String getBundleState(Bundle bundle) {
|
||||
switch (bundle.getState()) {
|
||||
case Bundle.ACTIVE : return "Active";
|
||||
case Bundle.INSTALLED : return "Installed";
|
||||
case Bundle.RESOLVED : return "Resolved";
|
||||
case Bundle.STARTING : return "Starting";
|
||||
case Bundle.STOPPING : return "Stopping";
|
||||
case Bundle.UNINSTALLED : return "Uninstalled";
|
||||
default : throw new IllegalStateException("Invalid state");
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isAllowedAction(Bundle bundle, String val) {
|
||||
int state = -1;
|
||||
try {
|
||||
state = bundle.getState();
|
||||
} catch (Exception e) {
|
||||
addActionError("Unable to determine bundle state. Exception: " + e.toString() + " (" + e.getMessage() + ")");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (val != null) {
|
||||
switch (val) {
|
||||
case "start":
|
||||
return state == Bundle.RESOLVED;
|
||||
case "stop":
|
||||
return state == Bundle.ACTIVE;
|
||||
case "update":
|
||||
return state == Bundle.ACTIVE || state == Bundle.INSTALLED || state == Bundle.RESOLVED;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("Invalid state");
|
||||
}
|
||||
|
||||
@Inject
|
||||
public void setConfiguration(Configuration configuration) {
|
||||
this.configuration = configuration;
|
||||
}
|
||||
|
||||
@Inject
|
||||
public void setBundleAccessor(BundleAccessor bundleAccessor) {
|
||||
this.bundleAccessor = bundleAccessor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void withServletContext(ServletContext servletContext) {
|
||||
osgiHost = (OsgiHost) servletContext.getAttribute(StrutsOsgiListener.OSGI_HOST);
|
||||
}
|
||||
}
|
||||
@@ -1,145 +0,0 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package org.apache.struts2.osgi.admin.actions;
|
||||
|
||||
import com.opensymphony.xwork2.Action;
|
||||
import com.opensymphony.xwork2.ActionSupport;
|
||||
import org.apache.felix.shell.ShellService;
|
||||
import org.apache.struts2.interceptor.parameter.StrutsParameter;
|
||||
import org.apache.struts2.osgi.DefaultBundleAccessor;
|
||||
import org.apache.struts2.osgi.interceptor.BundleContextAware;
|
||||
import org.osgi.framework.Bundle;
|
||||
import org.osgi.framework.BundleContext;
|
||||
import org.osgi.framework.ServiceReference;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.PrintStream;
|
||||
|
||||
/**
|
||||
* This action executes commands on the Felix Shell.
|
||||
*
|
||||
* The action is BundleContextAware so that if the OSGi interceptor is used the BundleContext
|
||||
* can be provided for configurations where the DefaultBundleAccessor is insufficient.
|
||||
*
|
||||
*/
|
||||
public class ShellAction extends ActionSupport implements BundleContextAware {
|
||||
private String command;
|
||||
private String output;
|
||||
private BundleContext bundleContext;
|
||||
|
||||
@Override
|
||||
public String execute() {
|
||||
// get service
|
||||
ByteArrayOutputStream outByteStream = new ByteArrayOutputStream();
|
||||
ByteArrayOutputStream errByteStream = new ByteArrayOutputStream();
|
||||
PrintStream outStream = new PrintStream(outByteStream);
|
||||
PrintStream errStream = new PrintStream(errByteStream);
|
||||
|
||||
String outString = null;
|
||||
String errString = null;
|
||||
try {
|
||||
executeCommand(command, outStream, errStream);
|
||||
outString = outByteStream.toString().trim();
|
||||
errString = errByteStream.toString().trim();
|
||||
} catch (Exception e) {
|
||||
outString = outByteStream.toString().trim();
|
||||
errString = "Exception: " + e.toString() + " (" + e.getMessage() + "). Output:" + outString +
|
||||
". Error: " + errByteStream.toString().trim(); // Full details for troubleshooting.
|
||||
} finally {
|
||||
outStream.close();
|
||||
errStream.close();
|
||||
}
|
||||
|
||||
output = errString != null && errString.length() > 0 ? errString : outString;
|
||||
return Action.SUCCESS;
|
||||
}
|
||||
|
||||
public String getCommand() {
|
||||
return command;
|
||||
}
|
||||
|
||||
@StrutsParameter
|
||||
public void setCommand(String command) {
|
||||
this.command = command;
|
||||
}
|
||||
|
||||
public String getOutput() {
|
||||
return output;
|
||||
}
|
||||
|
||||
public void executeCommand(String commandLine, PrintStream out, PrintStream err) throws Exception {
|
||||
ShellService shellService = getShellService(out);
|
||||
if (shellService != null) {
|
||||
out.println("Attempting to execute command: " + commandLine);
|
||||
shellService.executeCommand(commandLine, out, err);
|
||||
}
|
||||
else {
|
||||
err.println("Apache Felix Shell service is not installed");
|
||||
}
|
||||
}
|
||||
|
||||
private ShellService getShellService(PrintStream out) {
|
||||
//bundle can be de-activated, so keeping a reference aorund is not a good idea
|
||||
final DefaultBundleAccessor bundleAccessor = DefaultBundleAccessor.getInstance();
|
||||
ServiceReference ref = (bundleAccessor != null ? bundleAccessor.getServiceReference(ShellService.class.getName()) : null);
|
||||
//out.println("DefaultBundleAccessor: " + bundleAcessor + ", ServiceReference [" + ShellService.class.getName() + "]: " + ref); // No logger, for debugging only.
|
||||
|
||||
if (ref == null && this.bundleContext != null) {
|
||||
// Depending on OSGi and Felix bundle configurations, the DefaultBundleAccessor may not be able to locate the ShellService.
|
||||
// In such cases, use the bundleContext (if available) to locate the ShellService in a "brute-force" manner.
|
||||
final Bundle[] bundles = this.bundleContext.getBundles();
|
||||
if (bundles != null && bundles.length > 0) {
|
||||
for (Bundle currentBundle : bundles) {
|
||||
if (currentBundle != null) {
|
||||
//out.println("Bundle [" + index + "], SymbolicName: " + currentBundle.getSymbolicName() + ", Location: " + currentBundle.getLocation() + ", BundleID: " + currentBundle.getBundleId()); // No logger, for debugging only.
|
||||
if (currentBundle.getSymbolicName().startsWith("org.apache.felix.shell")) {
|
||||
BundleContext currentBundleContext = currentBundle.getBundleContext();
|
||||
Object directShellServiceByClass = (currentBundleContext != null ? currentBundleContext.getServiceReference(org.apache.felix.shell.ShellService.class) : null);
|
||||
Object directShellServiceByName = (currentBundleContext != null ? currentBundleContext.getServiceReference("org.apache.felix.shell.ShellService") : null);
|
||||
//out.println(" ShellService reference (via bundle's context) by class: " + directShellServiceByClass); // No logger, for debugging only.
|
||||
//out.println(" ShellService reference (via bundle's context) by name: " + directShellServiceByName); // No logger, for debugging only.
|
||||
if (ref == null) {
|
||||
ref = (directShellServiceByClass != null ? (ServiceReference) directShellServiceByClass : (ServiceReference) directShellServiceByName);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//out.println("Bundle [" + index + "] is null"); // No logger, for debugging only.
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//out.println("OSGi Interceptor-provided BundleContext bundle array is null or empty"); // No logger, for debugging only.
|
||||
}
|
||||
}
|
||||
|
||||
if (ref == null) {
|
||||
out.println("ShellService reference cannot be found (null), service lookup will fail.");
|
||||
}
|
||||
|
||||
return (ShellService) (bundleAccessor != null ? bundleAccessor.getService(ref) : null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBundleContext(BundleContext bundleContext) {
|
||||
//System.out.println("ShellAction - setBundleContext called. BundleContext: " + bundleContext); // No logger, for debugging only.
|
||||
this.bundleContext = bundleContext;
|
||||
}
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
Copyright jQuery Foundation and other contributors, https://jquery.org/
|
||||
|
||||
This software consists of voluntary contributions made by many
|
||||
individuals. For exact contribution history, see the revision history
|
||||
available at https://github.com/jquery/jquery-ui
|
||||
|
||||
The following license applies to all parts of this software except as
|
||||
documented below:
|
||||
|
||||
====
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
====
|
||||
|
||||
Copyright and related rights for sample code are waived via CC0. Sample
|
||||
code is defined as all source code contained within the demos directory.
|
||||
|
||||
CC0: http://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
====
|
||||
|
||||
All files located in the node_modules and external directories are
|
||||
externally maintained libraries used by this software which have their
|
||||
own licenses; we recommend you read them, as their terms may differ from
|
||||
the terms above.
|
||||
@@ -1,174 +0,0 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
@@ -1,9 +0,0 @@
|
||||
Apache Struts
|
||||
Copyright 2000-2011 The Apache Software Foundation
|
||||
|
||||
This product includes software developed by
|
||||
The Apache Software Foundation (https://www.apache.org/).
|
||||
|
||||
The binary distributions includes the following third party software:
|
||||
jQuery (https://jquery.com/).
|
||||
jQuery UI (https://jqueryui.com/).
|
||||
@@ -1,21 +0,0 @@
|
||||
<#--
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
-->
|
||||
${output!}
|
||||
@@ -1,60 +0,0 @@
|
||||
<#--
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>OSGi Console</title>
|
||||
|
||||
<@s.link rel="stylesheet" type="text/css" href="${base}${parameters.staticContentPath}/css/shell.css" />
|
||||
<@s.link rel="stylesheet" type="text/css" href="${base}${parameters.staticContentPath}/css/main.css" />
|
||||
<@s.link rel="stylesheet" type="text/css" href="${base}${parameters.staticContentPath}/css/redmond/jquery-ui-1.12.1.redmond.css" />
|
||||
|
||||
<@s.script src="${base}${parameters.staticContentPath}/js/shell.js" />
|
||||
<@s.script src="${base}${parameters.staticContentPath}/js/jquery-1.12.4.min.js" />
|
||||
<@s.script src="${base}${parameters.staticContentPath}/js/jquery-ui-1.12.1.min.js" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="menu">
|
||||
<div style="float:right;">
|
||||
<@s.url var="bundlesUrl" namespace="/osgi/admin" action="bundles" includeParams="none" />
|
||||
<@s.url var="osgiShellUrl" namespace="/osgi/admin" action="shell" includeParams="none" />
|
||||
<a href="${bundlesUrl}" class="ui-state-default ui-corner-all fg-button fg-button-icon-left">
|
||||
<span class="ui-icon ui-icon-bullet"></span>
|
||||
Bundles
|
||||
</a>
|
||||
<a href="${osgiShellUrl}" class="ui-state-default ui-corner-all fg-button fg-button-icon-left">
|
||||
<span class="ui-icon ui-icon-transferthick-e-w"></span>
|
||||
OSGi Shell
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="shell" >
|
||||
<form onsubmit="return false" id="wc-form">
|
||||
<div class="wc-results" id="wc-result">
|
||||
Welcome to the OSGi console! Type 'help' to see the list of available commands.
|
||||
<br />
|
||||
</div>
|
||||
<@s.url var="execUrl" namespace="/osgi/admin" action="execCommand" />
|
||||
<label for"command">Command:</label>
|
||||
<input name="command" onkeyup="keyEvent(event, '${execUrl}')" class="wc-command" id="wc-command" type="text" />
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,170 +0,0 @@
|
||||
<#--
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>${bundle.symbolicName!}</title>
|
||||
|
||||
<@s.link rel="stylesheet" type="text/css" href="${base}${parameters.staticContentPath}/css/main.css" />
|
||||
<@s.link rel="stylesheet" type="text/css" href="${base}${parameters.staticContentPath}/css/redmond/jquery-ui-1.12.1.redmond.css" />
|
||||
|
||||
<@s.script src="${base}${parameters.staticContentPath}/js/jquery-1.12.4.min.js"/>
|
||||
<@s.script src="${base}${parameters.staticContentPath}/js/jquery-ui-1.12.1.min.js" />
|
||||
|
||||
<@s.script>
|
||||
$(function() {
|
||||
$("#tabs").tabs();
|
||||
});
|
||||
</@s.script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="menu">
|
||||
<div style="float:left;">
|
||||
<#if action.isAllowedAction(bundle, "start")>
|
||||
<a href="bundle_${bundle.symbolicName}!start.action" class="ui-state-default ui-corner-all fg-button fg-button-icon-left">
|
||||
<span class="ui-icon ui-icon-play"></span>
|
||||
Start
|
||||
</a>
|
||||
</#if>
|
||||
|
||||
<#if action.isAllowedAction(bundle, "stop")>
|
||||
<a href="bundle_${bundle.symbolicName}!stop.action" class="ui-state-default ui-corner-all fg-button fg-button-icon-left">
|
||||
<span class="ui-icon ui-icon-stop"></span>
|
||||
Stop
|
||||
</a>
|
||||
</#if>
|
||||
|
||||
<#if action.isAllowedAction(bundle, "update")>
|
||||
<a href="bundle_${bundle.symbolicName}!update.action" class="ui-state-default ui-corner-all fg-button fg-button-icon-left">
|
||||
<span class="ui-icon ui-icon-refresh"></span>
|
||||
Update
|
||||
</a>
|
||||
</#if>
|
||||
</div>
|
||||
|
||||
<div style="float:right;">
|
||||
<@s.url var="bundlesUrl" namespace="/osgi/admin" action="bundles" includeParams="none" />
|
||||
<@s.url var="osgiShellUrl" namespace="/osgi/admin" action="shell" includeParams="none" />
|
||||
<a href="${bundlesUrl}" class="ui-state-default ui-corner-all fg-button fg-button-icon-left">
|
||||
<span class="ui-icon ui-icon-bullet"></span>
|
||||
Bundles
|
||||
</a>
|
||||
<a href="${osgiShellUrl}" class="ui-state-default ui-corner-all fg-button fg-button-icon-left">
|
||||
<span class="ui-icon ui-icon-transferthick-e-w"></span>
|
||||
OSGi Shell
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<@s.actionerror />
|
||||
|
||||
<div id="tabs" class="tabs">
|
||||
<ul>
|
||||
<li><a href="#tabs-1">OSGi Metadata</a></li>
|
||||
<li><a href="#tabs-2">Resgistered Services</a></li>
|
||||
<li><a href="#tabs-3">Services in Use</a></li>
|
||||
<li><a href="#tabs-4">Packages</a></li>
|
||||
<li><a href="#tabs-5">Headers</a></li>
|
||||
</ul>
|
||||
<div id="tabs-1">
|
||||
<table class="properties">
|
||||
<tr>
|
||||
<td class="name">Id</td>
|
||||
<td>${bundle.bundleId!}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name">Name</td>
|
||||
<td>${bundle.symbolicName!}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name">Location</td>
|
||||
<td>${bundle.location!}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name">Status</td>
|
||||
<td>${action.getBundleState(bundle)}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="tabs-2">
|
||||
<#list (bundle.registeredServices)! as service>
|
||||
<table class="properties">
|
||||
<#list (service.propertyKeys)! as key >
|
||||
<tr>
|
||||
<td class="name">${key}</td>
|
||||
<td>${action.displayProperty(service.getProperty(key))}</td>
|
||||
</tr>
|
||||
</#list>
|
||||
</table>
|
||||
<br/>
|
||||
</#list>
|
||||
</div>
|
||||
<div id="tabs-3">
|
||||
<#list (bundle.servicesInUse)! as service>
|
||||
<table class="properties">
|
||||
<#list (service.propertyKeys)! as key >
|
||||
<tr>
|
||||
<td class="name">${key}</td>
|
||||
<td>${action.displayProperty(service.getProperty(key))!}</td>
|
||||
</tr>
|
||||
</#list>
|
||||
</table>
|
||||
<br/>
|
||||
</#list>
|
||||
</div>
|
||||
<div id="tabs-4">
|
||||
<#list packages! as pkg>
|
||||
<table class="properties">
|
||||
<tr>
|
||||
<td class="name">Name</td>
|
||||
<td>${pkg.name}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name">Actions</td>
|
||||
<td>
|
||||
<ul>
|
||||
<#list (pkg.actionConfigs.keySet())! as name >
|
||||
<li>${name}</li>
|
||||
</#list>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br/>
|
||||
</#list>
|
||||
</div>
|
||||
<div id="tabs-5">
|
||||
<table class="properties">
|
||||
<#list headerKeys as header>
|
||||
<tr>
|
||||
<td class="name">${header}</td>
|
||||
<td><div class="propertyValue">${bundle.headers.get(header)}</div> </td>
|
||||
</tr>
|
||||
</#list>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<@s.actionmessage />
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,97 +0,0 @@
|
||||
<#--
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>OSGi Bundles</title>
|
||||
|
||||
<@s.link rel="stylesheet" type="text/css" href="${base}${parameters.staticContentPath}/css/main.css" />
|
||||
<@s.link rel="stylesheet" type="text/css" href="${base}${parameters.staticContentPath}/css/redmond/jquery-ui-1.12.1.redmond.css" />
|
||||
|
||||
<@s.script src="${base}${parameters.staticContentPath}/js/jquery-1.12.4.min.js" />
|
||||
<@s.script src="${base}${parameters.staticContentPath}/js/jquery-ui-1.12.1.min.js" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="menu">
|
||||
<div style="float:right;">
|
||||
<@s.url var="bundlesUrl" namespace="/osgi/admin" action="bundles" includeParams="none" />
|
||||
<@s.url var="osgiShellUrl" namespace="/osgi/admin" action="shell" includeParams="none" />
|
||||
<a href="${bundlesUrl}" class="ui-state-default ui-corner-all fg-button fg-button-icon-left">
|
||||
<span class="ui-icon ui-icon-bullet"></span>
|
||||
Bundles
|
||||
</a>
|
||||
<a href="${osgiShellUrl}" class="ui-state-default ui-corner-all fg-button fg-button-icon-left">
|
||||
<span class="ui-icon ui-icon-transferthick-e-w"></span>
|
||||
OSGi Shell
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<@s.actionerror />
|
||||
|
||||
<table class="properties" style="clear:both; width:700px">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Status</th>
|
||||
<th>Struts Bundle</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<#list bundles as bundle>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="bundle_${bundle.symbolicName}!view.action">${bundle.symbolicName}</a>
|
||||
</td>
|
||||
<td>${action.getBundleState(bundle)}</td>
|
||||
<td>${action.isStrutsEnabled(bundle)?string("yes", "no")}</td>
|
||||
<td style="width:200px">
|
||||
<#if action.isAllowedAction(bundle, "start")>
|
||||
<a href="bundle_${bundle.symbolicName}!start.action" class="ui-state-default ui-corner-all fg-button-small fg-button-icon-left">
|
||||
<span class="ui-icon ui-icon-play"></span>
|
||||
Start
|
||||
</a>
|
||||
</#if>
|
||||
|
||||
<#if action.isAllowedAction(bundle, "stop")>
|
||||
<a href="bundle_${bundle.symbolicName}!stop.action" class="ui-state-default ui-corner-all fg-button-small fg-button-icon-left">
|
||||
<span class="ui-icon ui-icon-stop"></span>
|
||||
Stop
|
||||
</a>
|
||||
</#if>
|
||||
|
||||
<#if action.isAllowedAction(bundle, "update")>
|
||||
<a href="bundle_${bundle.symbolicName}!update.action" class="ui-state-default ui-corner-all fg-button-small fg-button-icon-left">
|
||||
<span class="ui-icon ui-icon-refresh"></span>
|
||||
Update
|
||||
</a>
|
||||
</#if>
|
||||
</td>
|
||||
</tr>
|
||||
</#list>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<@s.actionmessage />
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,103 +0,0 @@
|
||||
.right {
|
||||
clear: both;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.left {
|
||||
clear: both;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.bundleDetails td {
|
||||
border: 1px solid #C8C8C8;
|
||||
}
|
||||
|
||||
.rowTitle {
|
||||
width: 141px;
|
||||
font-weight: bold;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
table.properties {
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
border-color: #3366CC;
|
||||
}
|
||||
|
||||
table.properties td {
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
border-color: #3366CC;
|
||||
}
|
||||
|
||||
table.properties td.name {
|
||||
background-color: #C3D9FF;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
table.properties th {
|
||||
background-color: #C3D9FF;
|
||||
}
|
||||
|
||||
img {
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
.fg-button {
|
||||
outline: 0;
|
||||
margin: 0 4px 0 0;
|
||||
padding: .4em 1em;
|
||||
text-decoration: none !important;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
text-align: center;
|
||||
zoom: 1;
|
||||
}
|
||||
|
||||
.fg-button .ui-icon {
|
||||
margin-left: -3px;
|
||||
margin-top: -8px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
}
|
||||
|
||||
.fg-button-small {
|
||||
outline: 0;
|
||||
margin: 0 4px 0 0;
|
||||
padding: 0em 1em;
|
||||
text-decoration: none !important;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.fg-button-small .ui-icon {
|
||||
margin-left: -3px;
|
||||
margin-top: -8px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
}
|
||||
|
||||
.fg-button-icon-left .ui-icon {
|
||||
left: 0em;
|
||||
margin-left: 0;
|
||||
right: auto;
|
||||
}
|
||||
|
||||
.menu {
|
||||
clear: both;
|
||||
padding-bottom: 10px;
|
||||
height:25px;
|
||||
}
|
||||
|
||||
.tabs {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.propertyValue {
|
||||
width: 600px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 180 B |
|
Before Width: | Height: | Size: 182 B |
|
Before Width: | Height: | Size: 124 B |
|
Before Width: | Height: | Size: 123 B |
|
Before Width: | Height: | Size: 119 B |
|
Before Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 88 B |
|
Before Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 5.3 KiB |
@@ -1,43 +0,0 @@
|
||||
/*
|
||||
* $Id: webconsole.css 590812 2007-10-31 20:32:54Z apetrelli $
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
#shell {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.wc-results {
|
||||
overflow: auto;
|
||||
margin: 0px;
|
||||
padding: 5px;
|
||||
font-family: courier;
|
||||
color: white;
|
||||
background-color: black;
|
||||
height: 400px;
|
||||
}
|
||||
.wc-results pre {
|
||||
display: inline;
|
||||
}
|
||||
.wc-command {
|
||||
margin: 0px;
|
||||
font-family: courier;
|
||||
color: white;
|
||||
background-color: black;
|
||||
width: 100%;
|
||||
}
|
||||
@@ -1,83 +0,0 @@
|
||||
/*
|
||||
* $Id: webconsole.js 590812 2007-10-31 20:32:54Z apetrelli $
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
function printResult(result_string)
|
||||
{
|
||||
var result_div = $('#wc-result')[0];
|
||||
var result_array = result_string.split('\n');
|
||||
|
||||
var new_command = $('#wc-command').val();
|
||||
result_div.appendChild(document.createTextNode('$ ' + new_command));
|
||||
result_div.appendChild(document.createElement('br'));
|
||||
|
||||
for (var line_index in result_array) {
|
||||
var result_wrap = document.createElement('pre');
|
||||
var line = document.createTextNode(result_array[line_index]);
|
||||
result_wrap.appendChild(line);
|
||||
result_div.appendChild(result_wrap);
|
||||
result_div.appendChild(document.createElement('br'));
|
||||
|
||||
}
|
||||
|
||||
result_div.scrollTop = result_div.scrollHeight;
|
||||
$('#wc-command').val('');
|
||||
}
|
||||
|
||||
function keyEvent(event, url)
|
||||
{
|
||||
switch(event.keyCode){
|
||||
case 13:
|
||||
var the_shell_command = $('#wc-command').val();
|
||||
if (the_shell_command) {
|
||||
commands_history[commands_history.length] = the_shell_command;
|
||||
history_pointer = commands_history.length;
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: url,
|
||||
data: $("#wc-command").serialize(),
|
||||
success: function (data, textStatus) {
|
||||
printResult(data);
|
||||
},
|
||||
error: function (request, textStatus) {
|
||||
printResult(textStatus);
|
||||
}
|
||||
});
|
||||
}
|
||||
break;
|
||||
case 38: // this is the arrow up
|
||||
if (history_pointer > 0) {
|
||||
history_pointer--;
|
||||
$('#wc-command').val(commands_history[history_pointer]);
|
||||
}
|
||||
break;
|
||||
case 40: // this is the arrow down
|
||||
if (history_pointer < commands_history.length - 1 ) {
|
||||
history_pointer++;
|
||||
$('#wc-command').val(commands_history[history_pointer]);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
var commands_history = new Array();
|
||||
var history_pointer;
|
||||
@@ -1,50 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!--
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
-->
|
||||
|
||||
<!DOCTYPE struts PUBLIC
|
||||
"-//Apache Software Foundation//DTD Struts Configuration 6.0//EN"
|
||||
"https://struts.apache.org/dtds/struts-6.0.dtd">
|
||||
|
||||
<struts>
|
||||
<constant name="struts.enable.DynamicMethodInvocation" value="false" />
|
||||
<package name="bundle-admin" namespace="/osgi/admin" extends="osgi-default" strict-method-invocation="true">
|
||||
<default-action-ref name="bundles" />
|
||||
|
||||
<action name="bundle_*!*" class="org.apache.struts2.osgi.admin.actions.BundlesAction" method="{2}">
|
||||
<param name="id">{1}</param>
|
||||
<result type="freemarker">viewBundle.ftl</result>
|
||||
<allowed-methods>index,view,start,stop,update</allowed-methods>
|
||||
</action>
|
||||
|
||||
<action name="bundles" class="org.apache.struts2.osgi.admin.actions.BundlesAction" method="index">
|
||||
<result type="freemarker">viewBundles.ftl</result>
|
||||
</action>
|
||||
|
||||
<action name="execCommand" class="org.apache.struts2.osgi.admin.actions.ShellAction">
|
||||
<result type="freemarker">commandResult.ftl</result>
|
||||
</action>
|
||||
|
||||
<action name="shell" class="org.apache.struts2.osgi.admin.actions.ShellAction">
|
||||
<result type="freemarker">shell.ftl</result>
|
||||
</action>
|
||||
</package>
|
||||
</struts>
|
||||
@@ -1,78 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
-->
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-osgi-bundles</artifactId>
|
||||
<version>6.7.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>struts2-osgi-demo-bundle</artifactId>
|
||||
<packaging>bundle</packaging>
|
||||
<name>DEPRECATED: Struts 2 OSGi Demo Bundle - since 6.0.0</name>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-velocity-plugin</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-digester3</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-convention-plugin</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-osgi-plugin</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.felix</groupId>
|
||||
<artifactId>maven-bundle-plugin</artifactId>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<instructions>
|
||||
<manifestLocation>META-INF</manifestLocation>
|
||||
<Import-Package>*</Import-Package>
|
||||
<Spring-Context>*;create-asynchronously:=false</Spring-Context>
|
||||
<Struts2-Enabled>true</Struts2-Enabled>
|
||||
</instructions>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
</project>
|
||||
@@ -1,44 +0,0 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package actions.osgi;
|
||||
|
||||
import com.opensymphony.xwork2.ActionSupport;
|
||||
import org.apache.struts2.convention.annotation.ResultPath;
|
||||
import org.apache.struts2.osgi.action.BundleContextAware;
|
||||
import org.osgi.framework.Bundle;
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
/**
|
||||
* This action shows how to interact with the OSGi container, using the OSGi interceptor
|
||||
*/
|
||||
@ResultPath("/content")
|
||||
public class BundlesAction extends ActionSupport implements BundleContextAware {
|
||||
private BundleContext bundleContext;
|
||||
|
||||
@Override
|
||||
public void withBundleContext(BundleContext bundleContext) {
|
||||
this.bundleContext = bundleContext;
|
||||
}
|
||||
|
||||
public Bundle[] getBundles() {
|
||||
return bundleContext.getBundles();
|
||||
}
|
||||
}
|
||||
@@ -1,65 +0,0 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package actions.osgi;
|
||||
|
||||
import com.opensymphony.xwork2.ActionSupport;
|
||||
import org.apache.struts2.convention.annotation.Action;
|
||||
import org.apache.struts2.convention.annotation.Actions;
|
||||
import org.apache.struts2.convention.annotation.Namespace;
|
||||
import org.apache.struts2.convention.annotation.Result;
|
||||
import org.apache.struts2.convention.annotation.ResultPath;
|
||||
import org.apache.struts2.interceptor.parameter.StrutsParameter;
|
||||
|
||||
@Namespace("/osgi")
|
||||
@ResultPath("/content/osgi")
|
||||
public class HelloWorldAction extends ActionSupport {
|
||||
private Message message = new Message("Default non-null message");
|
||||
|
||||
@Override
|
||||
@Actions({
|
||||
@Action(value="hello-convention", results={@Result(name="success", type="freemarker", location="/content/osgi/hello-convention.ftl")}),
|
||||
@Action(value="/osgi/hello-convention", results={@Result(name="success", type="freemarker", location="/content/osgi/hello-convention.ftl")})
|
||||
})
|
||||
public String execute() {
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
@StrutsParameter(depth = 1)
|
||||
public Message getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public void setMessage(Message message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public String getSimpleMessage() {
|
||||
return "Hello!!!";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder("{message:");
|
||||
sb.append(message != null ? message.getText() : "null");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package actions.osgi;
|
||||
|
||||
public class Message {
|
||||
private String text;
|
||||
|
||||
public Message(String text) {
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
public String getText() {
|
||||
return text;
|
||||
}
|
||||
|
||||
public void setText(String text) {
|
||||
this.text = text;
|
||||
}
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
-->
|
||||
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
|
||||
|
||||
<bean class="actions.osgi.Message" id="message">
|
||||
<constructor-arg type="java.lang.String" value="Welcome to the OSGi plugin. You can checkout any time you like, but can never leave"/>
|
||||
</bean>
|
||||
|
||||
<bean class="actions.osgi.HelloWorldAction" id="helloWorldAction" scope="prototype">
|
||||
<property name="message" ref="message" />
|
||||
</bean>
|
||||
</beans>
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
<#--
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>OSGi integration</title>
|
||||
</head>
|
||||
<body>
|
||||
This action was mapped by <b>Convention</b>, and shows how to get access to the <b>BundleContext</b>
|
||||
and registered services
|
||||
<br />
|
||||
Spring Application Contexts: ${applicationContextsCount!}
|
||||
<br>
|
||||
Bundles List:
|
||||
<ul>
|
||||
<#list bundles as bundle>
|
||||
<li>${bundle.symbolicName!}</li>
|
||||
</#list>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,30 +0,0 @@
|
||||
<#--
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>Action mapped by the Convention plugin</title>
|
||||
</head>
|
||||
<body>
|
||||
This is an action mapped by the Convention plugin, using a FreeMarker result.
|
||||
<br />
|
||||
Message from Action: ${simpleMessage}
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,30 +0,0 @@
|
||||
<#--
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>Action mapped by the XML configuration</title>
|
||||
</head>
|
||||
<body>
|
||||
This is an action mapped by XML configuration, using a <b>FreeMarker</b> result.
|
||||
<br />
|
||||
Message from Action: ${message.text}
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,28 +0,0 @@
|
||||
#*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*#
|
||||
<html>
|
||||
<head>
|
||||
<title>Action mapped by the XML configuration</title>
|
||||
</head>
|
||||
<body>
|
||||
This is an action mapped by XML configuration, using a <b>Velocity</b> result.
|
||||
<br />
|
||||
Message from Action: $message.text
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,34 +0,0 @@
|
||||
<#--
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>OSGi Demo Bundle</title>
|
||||
</head>
|
||||
<body>
|
||||
This demo contains actions that will be packaged into an OSGi bundle and loaded by the Struts 2 OSGi plugin.
|
||||
<br />
|
||||
<ul>
|
||||
<li><@s.a namespace="/osgi" action="hello-convention">Action mapped by the Convention plugin, with FreeMarker result</@s.a></li>
|
||||
<li><@s.a namespace="/osgi" action="hello-freemarker">Action mapped by XML, with FreeMarker result</@s.a></li>
|
||||
<li><@s.a namespace="/osgi" action="hello-velocity">Action mapped by XML, with Velocity result</@s.a></li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,55 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!--
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
-->
|
||||
<!DOCTYPE struts PUBLIC
|
||||
"-//Apache Software Foundation//DTD Struts Configuration 6.0//EN"
|
||||
"https://struts.apache.org/dtds/struts-6.0.dtd">
|
||||
|
||||
<struts>
|
||||
<!-- Set some Struts 2 constants relevant to the OSGi Plugin.
|
||||
Note: The constant definitions specified here (within the demo bundle) may also need to be
|
||||
duplicated in the struts.xml configuration of the outer project that packages the demo
|
||||
bundle JAR file within it.
|
||||
-->
|
||||
<constant name="struts.objectFactory" value="osgi" />
|
||||
<constant name="struts.objectFactory.delegate" value="struts" />
|
||||
<constant name="struts.freemarker.manager.classname" value="org.apache.struts2.osgi.BundleFreemarkerManager" />
|
||||
<constant name="struts.velocity.manager.classname" value="org.apache.struts2.osgi.VelocityBundleResourceLoader" />
|
||||
<constant name="struts.staticContentLoader" value="org.apache.struts2.osgi.loaders.StaticContentBundleResourceLoader" />
|
||||
|
||||
<package name="bundle-demo" namespace="/osgi" extends="osgi-default, velocity-default" strict-method-invocation="true">
|
||||
|
||||
<default-action-ref name="home" />
|
||||
|
||||
<action name="hello-velocity" class="actions.osgi.HelloWorldAction">
|
||||
<result type="velocity">/content/osgi/hello.vm</result>
|
||||
</action>
|
||||
|
||||
<action name="hello-freemarker" class="actions.osgi.HelloWorldAction">
|
||||
<result type="freemarker">/content/osgi/hello.ftl</result>
|
||||
</action>
|
||||
|
||||
<action name="home" class="actions.osgi.HelloWorldAction">
|
||||
<result type="freemarker">/content/osgi/home.ftl</result>
|
||||
</action>
|
||||
|
||||
</package>
|
||||
</struts>
|
||||
@@ -1,83 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
-->
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-parent</artifactId>
|
||||
<version>6.7.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>struts2-osgi-bundles</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<name>DEPRECATED: Struts 2 OSGi Bundles - since 6.0.0</name>
|
||||
|
||||
<modules>
|
||||
<module>admin</module>
|
||||
<module>demo</module>
|
||||
</modules>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Test dependencies -->
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<reporting>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.rat</groupId>
|
||||
<artifactId>apache-rat-plugin</artifactId>
|
||||
<configuration>
|
||||
<includes>
|
||||
<include>pom.xml</include>
|
||||
<include>src/**</include>
|
||||
</includes>
|
||||
<excludes>
|
||||
<exclude>src/main/resources/*LICENSE.txt</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</reporting>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
</project>
|
||||
@@ -24,7 +24,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-parent</artifactId>
|
||||
<version>6.7.0-SNAPSHOT</version>
|
||||
<version>7.0.0-M9</version>
|
||||
</parent>
|
||||
<artifactId>struts2-core</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
@@ -91,7 +91,6 @@
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>build-maven</id>
|
||||
@@ -116,7 +115,8 @@
|
||||
The tags interact with the framework's validation and
|
||||
internationalization features;
|
||||
to ensure that input is correct and output is localized.
|
||||
The Struts Tags can be used with JSP FreeMarker or Velocity."</arg>
|
||||
The Struts Tags can be used with JSP FreeMarker or Velocity."
|
||||
</arg>
|
||||
<arg>-AoutTemplatesDir=${basedir}/src/site/resources/tags</arg>
|
||||
</compilerArgs>
|
||||
</configuration>
|
||||
@@ -132,52 +132,8 @@
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>alljars</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-source</id>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<sourcepath>${basedir}/src/main/java;${basedir}/../xwork-core/src/main/java</sourcepath>
|
||||
<encoding>UTF-8</encoding>
|
||||
<groups>
|
||||
<group>
|
||||
<title>Struts Packages</title>
|
||||
<packages>org.apache.struts2*</packages>
|
||||
</group>
|
||||
<group>
|
||||
<title>XWork Packages</title>
|
||||
<packages>com.opensymphony.xwork2*</packages>
|
||||
</group>
|
||||
</groups>
|
||||
<show>private</show>
|
||||
<links>
|
||||
<link>http://java.sun.com/j2se/1.5.0/docs/api</link>
|
||||
<link>http://java.sun.com/javaee/5/docs/api/</link>
|
||||
<link>http://jakarta.apache.org/commons/logging/apidocs/</link>
|
||||
<link>http://logging.apache.org/log4j/docs/api/</link>
|
||||
</links>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.freemarker</groupId>
|
||||
@@ -190,14 +146,14 @@
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
<groupId>jakarta.servlet</groupId>
|
||||
<artifactId>jakarta.servlet-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.servlet.jsp</groupId>
|
||||
<artifactId>jsp-api</artifactId>
|
||||
<groupId>jakarta.servlet.jsp</groupId>
|
||||
<artifactId>jakarta.servlet.jsp-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -214,14 +170,13 @@
|
||||
|
||||
<!-- File upload -->
|
||||
<dependency>
|
||||
<groupId>commons-fileupload</groupId>
|
||||
<artifactId>commons-fileupload</artifactId>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-fileupload2-jakarta-servlet6</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
@@ -259,6 +214,11 @@
|
||||
<artifactId>spring-context-support</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.el</groupId>
|
||||
<artifactId>jakarta.el-api</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.awaitility</groupId>
|
||||
@@ -286,26 +246,7 @@
|
||||
|
||||
<dependency>
|
||||
<groupId>mockobjects</groupId>
|
||||
<artifactId>mockobjects-jdk1.3</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>mockobjects</groupId>
|
||||
<artifactId>mockobjects-alt-jdk1.3</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>mockobjects</groupId>
|
||||
<artifactId>mockobjects-alt-jdk1.3-j2ee1.3</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>mockobjects</groupId>
|
||||
<artifactId>mockobjects-jdk1.3-j2ee1.3</artifactId>
|
||||
<scope>test</scope>
|
||||
<artifactId>mockobjects-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -326,11 +267,6 @@
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>mockobjects</groupId>
|
||||
<artifactId>mockobjects-core</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.easymock</groupId>
|
||||
<artifactId>easymock</artifactId>
|
||||
|
||||
@@ -26,10 +26,10 @@ import org.apache.struts2.StrutsStatics;
|
||||
import org.apache.struts2.dispatcher.HttpParameters;
|
||||
import org.apache.struts2.dispatcher.mapper.ActionMapping;
|
||||
|
||||
import javax.servlet.ServletContext;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.servlet.jsp.PageContext;
|
||||
import jakarta.servlet.ServletContext;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.jsp.PageContext;
|
||||
import java.io.Serializable;
|
||||
import java.util.HashMap;
|
||||
import java.util.Locale;
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
*/
|
||||
package com.opensymphony.xwork2.config;
|
||||
|
||||
import javax.servlet.ServletContext;
|
||||
import jakarta.servlet.ServletContext;
|
||||
|
||||
/**
|
||||
* Dedicated interface to allow inject {@link ServletContext} and perform initialisation based in it
|
||||
|
||||
@@ -82,14 +82,6 @@ public abstract class XmlConfigurationProvider extends XmlDocConfigurationProvid
|
||||
this.configFileName = filename;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since 6.2.0, use {@link #XmlConfigurationProvider(String)}
|
||||
*/
|
||||
@Deprecated
|
||||
public XmlConfigurationProvider(String filename, @Deprecated boolean notUsed) {
|
||||
this(filename);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(Configuration configuration) {
|
||||
super.init(configuration);
|
||||
|
||||
@@ -462,7 +462,7 @@ public abstract class XmlDocConfigurationProvider implements ConfigurationProvid
|
||||
Location location = DomHelper.getLocationObject(actionElement);
|
||||
|
||||
if (!className.isEmpty()) {
|
||||
verifyAction(className, name, location);
|
||||
verifyAction(className, location);
|
||||
}
|
||||
|
||||
Map<String, ResultConfig> results;
|
||||
@@ -493,7 +493,7 @@ public abstract class XmlDocConfigurationProvider implements ConfigurationProvid
|
||||
String methodName = trimToNull(actionElement.getAttribute("method"));
|
||||
|
||||
List<InterceptorMapping> interceptorList = buildInterceptorList(actionElement, packageContext);
|
||||
List<ExceptionMappingConfig> exceptionMappings = buildExceptionMappings(actionElement, packageContext);
|
||||
List<ExceptionMappingConfig> exceptionMappings = buildExceptionMappings(actionElement);
|
||||
Set<String> allowedMethods = buildAllowedMethods(actionElement, packageContext);
|
||||
|
||||
return new ActionConfig.Builder(packageContext.getName(), actionName, className)
|
||||
@@ -508,15 +508,6 @@ public abstract class XmlDocConfigurationProvider implements ConfigurationProvid
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since 6.2.0, use {@link #verifyAction(String, Location)}
|
||||
*/
|
||||
@Deprecated
|
||||
protected boolean verifyAction(String className, String name, Location loc) {
|
||||
verifyAction(className, loc);
|
||||
return true;
|
||||
}
|
||||
|
||||
protected void verifyAction(String className, Location loc) {
|
||||
if (className.contains("{")) {
|
||||
LOG.debug("Action class [{}] contains a wildcard replacement value, so it can't be verified", className);
|
||||
@@ -782,14 +773,6 @@ public abstract class XmlDocConfigurationProvider implements ConfigurationProvid
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since 6.2.0, use {@link #buildExceptionMappings(Element)}
|
||||
*/
|
||||
@Deprecated
|
||||
protected List<ExceptionMappingConfig> buildExceptionMappings(Element element, PackageConfig.Builder packageContext) {
|
||||
return buildExceptionMappings(element);
|
||||
}
|
||||
|
||||
/**
|
||||
* Build a list of exception mapping objects from below a given XML element.
|
||||
*
|
||||
@@ -927,7 +910,7 @@ public abstract class XmlDocConfigurationProvider implements ConfigurationProvid
|
||||
|
||||
if (globalExceptionMappingList.getLength() > 0) {
|
||||
Element globalExceptionMappingElement = (Element) globalExceptionMappingList.item(0);
|
||||
List<ExceptionMappingConfig> exceptionMappings = buildExceptionMappings(globalExceptionMappingElement, packageContext);
|
||||
List<ExceptionMappingConfig> exceptionMappings = buildExceptionMappings(globalExceptionMappingElement);
|
||||
packageContext.addGlobalExceptionMappingConfigs(exceptionMappings);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ import java.io.Serializable;
|
||||
*
|
||||
* <p>
|
||||
* An interceptor is a stateless class that follows the interceptor pattern, as
|
||||
* found in {@link javax.servlet.Filter} and in AOP languages.
|
||||
* found in {@link jakarta.servlet.Filter} and in AOP languages.
|
||||
* </p>
|
||||
*
|
||||
* <p>
|
||||
|
||||
@@ -30,13 +30,6 @@ import org.apache.struts2.StrutsConstants;
|
||||
public class DefaultOgnlBeanInfoCacheFactory<Key, Value> extends DefaultOgnlCacheFactory<Key, Value>
|
||||
implements BeanInfoCacheFactory<Key, Value> {
|
||||
|
||||
/**
|
||||
* @deprecated since 6.4.0, use {@link #DefaultOgnlBeanInfoCacheFactory(String, String)}
|
||||
*/
|
||||
@Deprecated
|
||||
public DefaultOgnlBeanInfoCacheFactory() {
|
||||
}
|
||||
|
||||
@Inject
|
||||
public DefaultOgnlBeanInfoCacheFactory(@Inject(value = StrutsConstants.STRUTS_OGNL_BEANINFO_CACHE_MAXSIZE) String cacheMaxSize,
|
||||
@Inject(value = StrutsConstants.STRUTS_OGNL_BEANINFO_CACHE_TYPE) String defaultCacheType) {
|
||||
|
||||