remobe struts2 example module
git-svn-id: https://svn.apache.org/repos/asf/archiva/redback/redback-core/trunk@1310289 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7486a46478
commit
d42e081529
|
@ -1,23 +0,0 @@
|
|||
|
||||
Running the Redback Security Example Webapp
|
||||
------------------------------------------
|
||||
|
||||
To run, open a command prompt/terminal.
|
||||
|
||||
1) Change directory to the Redback Security Example Webapp.
|
||||
|
||||
2) Run the following Maven command line.
|
||||
|
||||
> mvn jetty:run-war
|
||||
|
||||
This is ensure that the requisite resources are overlaid for example webapp
|
||||
before it is deployed to a Jetty instance.
|
||||
|
||||
jetty:run-war will also run the unit tests for the example webapp. You can
|
||||
skip them like so:
|
||||
|
||||
> mvn jetty:run-war -Dmaven.test.skip
|
||||
|
||||
Or tomcat maven plugin
|
||||
mvn tomcat:run
|
||||
and go to http://localhost:9090
|
|
@ -1,330 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
~ Copyright 2006 The Codehaus.
|
||||
~
|
||||
~ Licensed 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">
|
||||
<parent>
|
||||
<groupId>org.codehaus.redback</groupId>
|
||||
<artifactId>redback-struts2</artifactId>
|
||||
<version>1.5-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>redback-struts2-example</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<name>Redback :: Integration :: Struts 2 Example Webapp</name>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>jcl-over-slf4j</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.redback</groupId>
|
||||
<artifactId>redback-struts2-content</artifactId>
|
||||
<type>war</type>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.redback</groupId>
|
||||
<artifactId>redback-struts2-integration</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.redback</groupId>
|
||||
<artifactId>redback-rbac-role-manager</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.redback</groupId>
|
||||
<artifactId>redback-common-integrations</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.redback</groupId>
|
||||
<artifactId>redback-users-ldap</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.redback</groupId>
|
||||
<artifactId>redback-rest-services</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-bundle-jaxrs</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-server</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.geronimo.specs</groupId>
|
||||
<artifactId>geronimo-servlet_3.0_spec</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.geronimo.specs</groupId>
|
||||
<artifactId>geronimo-javamail_1.4_spec</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-web</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-clean-plugin</artifactId>
|
||||
<configuration>
|
||||
<filesets>
|
||||
<fileset>
|
||||
<directory>${basedir}/</directory>
|
||||
<includes>
|
||||
<include>derby.log</include>
|
||||
</includes>
|
||||
</fileset>
|
||||
<fileset>
|
||||
<directory>${basedir}/src/main/webapp</directory>
|
||||
<includes>
|
||||
<include>META-INF</include>
|
||||
<include>images/redback</include>
|
||||
<include>css/redback</include>
|
||||
<include>template</include>
|
||||
<include>WEB-INF/classes</include>
|
||||
<include>WEB-INF/lib</include>
|
||||
<include>WEB-INF/database</include>
|
||||
<include>WEB-INF/logs</include>
|
||||
<include>WEB-INF/temp</include>
|
||||
<include>WEB-INF/jsp/redback</include>
|
||||
</includes>
|
||||
</fileset>
|
||||
</filesets>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<!-- skip example deployement -->
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>compile</phase>
|
||||
<goals>
|
||||
<goal>inplace</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<archiveClasses>false</archiveClasses>
|
||||
<dependentWarExcludes>WEB-INF/web.xml,WEB-INF/lib/**/*.jar</dependentWarExcludes>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<!--
|
||||
here an hack to prevent multiple struts core in classpath
|
||||
which prevent struts start
|
||||
and same struts.xml in the classpath too
|
||||
-->
|
||||
<plugin>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>cleanup-struts-jar-in-webapp</id>
|
||||
<phase>compile</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<tasks>
|
||||
<delete includeemptydirs="true">
|
||||
<fileset dir="${basedir}/src/main/webapp/WEB-INF/lib" includes="**/*.jar" />
|
||||
</delete>
|
||||
<delete includeemptydirs="true">
|
||||
<fileset dir="${basedir}/src/main/webapp/WEB-INF/classes" includes="**/struts.*" />
|
||||
</delete>
|
||||
<copy overwrite="true" file="${basedir}/src/test/log4j.xml" todir="${basedir}/src/main/webapp/WEB-INF/classes" />
|
||||
</tasks>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>maven-jetty-plugin</artifactId>
|
||||
<version>6.1.11</version>
|
||||
<configuration>
|
||||
<scanIntervalSeconds>10</scanIntervalSeconds>
|
||||
<contextPath>/</contextPath>
|
||||
<jettyEnvXml>src/jetty-env.xml</jettyEnvXml>
|
||||
<webAppConfig>
|
||||
<contextPath>/</contextPath>
|
||||
<jettyEnvXmlFile>src/jetty-env.xml</jettyEnvXmlFile>
|
||||
</webAppConfig>
|
||||
<systemProperties>
|
||||
<property>
|
||||
<name>appserver.base</name>
|
||||
<value>${basedir}/target</value>
|
||||
</property>
|
||||
</systemProperties>
|
||||
<connectors>
|
||||
<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
|
||||
<port>9090</port>
|
||||
<maxIdleTime>60000</maxIdleTime>
|
||||
</connector>
|
||||
</connectors>
|
||||
</configuration>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.derby</groupId>
|
||||
<artifactId>derby</artifactId>
|
||||
<version>${derbyVersion}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>tomcat-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<port>9090</port>
|
||||
<path>/</path>
|
||||
<contextFile>${basedir}/src/test/tomcat/tomcat-context.xml</contextFile>
|
||||
<systemProperties>
|
||||
<plexus.home>${project.build.directory}/appserver-base</plexus.home>
|
||||
<appserver.base>${project.build.directory}/appserver-base</appserver.base>
|
||||
<appserver.home>${project.build.directory}/appserver-home</appserver.home>
|
||||
<derby.system.home>${project.build.directory}/appserver-base/logs</derby.system.home>
|
||||
</systemProperties>
|
||||
</configuration>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.derby</groupId>
|
||||
<artifactId>derby</artifactId>
|
||||
<version>${derbyVersion}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.mail</groupId>
|
||||
<artifactId>mail</artifactId>
|
||||
<version>1.4</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>jspc-maven-plugin</artifactId>
|
||||
<version>1.4.6</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>compile</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<warSourceDirectory>${project.build.directory}/${project.build.finalName}/</warSourceDirectory>
|
||||
<!--
|
||||
Uncomment outputWebXml if you want the generated web.xml to
|
||||
be placed in the working directory that the war:war mojo uses.
|
||||
-->
|
||||
<!--
|
||||
<outputWebXml>${project.build.directory}/${project.build.finalName}/WEB-INF/web.xml</outputWebXml>
|
||||
-->
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>postgres</id>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
<version>8.2-504.jdbc3</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>maven-jetty-plugin</artifactId>
|
||||
<configuration>
|
||||
<jettyEnvXml>src/jetty-env-postgres.xml</jettyEnvXml>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>mysql</id>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>5.0.4</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>maven-jetty-plugin</artifactId>
|
||||
<configuration>
|
||||
<jettyEnvXml>src/jetty-env-mysql.xml</jettyEnvXml>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<!-- profile for dev an log output in the console -->
|
||||
<id>dev</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>override-log4j-with-console-output</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<tasks>
|
||||
<copy overwrite="true" file="${basedir}/src/test/log4j.xml" todir="${basedir}/src/main/webapp/WEB-INF/classes" />
|
||||
</tasks>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
|
@ -1,64 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
~ Copyright 2005-2006 The Apache Software Foundation.
|
||||
~
|
||||
~ Licensed 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 Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
|
||||
<Configure class="org.mortbay.jetty.webapp.WebAppContext">
|
||||
|
||||
|
||||
|
||||
<New id="validation_mail" class="org.mortbay.jetty.plus.naming.Resource">
|
||||
<Arg>mail/Session</Arg>
|
||||
<Arg>
|
||||
<New class="org.mortbay.naming.factories.MailSessionReference">
|
||||
<Set name="user"></Set>
|
||||
<Set name="password"></Set>
|
||||
<Set name="properties">
|
||||
<New class="java.util.Properties">
|
||||
<Put name="mail.smtp.host">localhost</Put>
|
||||
<Put name="mail.from">continuum@localhost</Put>
|
||||
<Put name="mail.senderName">Continuum</Put>
|
||||
<Put name="mail.debug">true</Put>
|
||||
</New>
|
||||
</Set>
|
||||
</New>
|
||||
</Arg>
|
||||
</New>
|
||||
<New id="users" class="org.mortbay.jetty.plus.naming.Resource">
|
||||
<Arg>jdbc/users</Arg>
|
||||
<Arg>
|
||||
<New class="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource">
|
||||
<Set name="serverName">localhost</Set>
|
||||
<Set name="databaseName">users</Set>
|
||||
<Set name="user">root</Set>
|
||||
<Set name="password"></Set>
|
||||
</New>
|
||||
</Arg>
|
||||
</New>
|
||||
<New id="users_shutdown" class="org.mortbay.jetty.plus.naming.Resource">
|
||||
<Arg>jdbc/shutdown</Arg>
|
||||
<Arg>
|
||||
<New class="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource">
|
||||
<Set name="serverName">localhost</Set>
|
||||
<Set name="databaseName">users</Set>
|
||||
<Set name="user">root</Set>
|
||||
<Set name="password"></Set>
|
||||
</New>
|
||||
</Arg>
|
||||
</New>
|
||||
|
||||
</Configure>
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
~ Copyright 2005-2006 The Apache Software Foundation.
|
||||
~
|
||||
~ Licensed 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 Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
|
||||
<Configure class="org.mortbay.jetty.webapp.WebAppContext">
|
||||
|
||||
<New id="users" class="org.mortbay.jetty.plus.naming.Resource">
|
||||
<Arg>jdbc/users</Arg>
|
||||
<Arg>
|
||||
<New class="org.postgresql.ds.PGPoolingDataSource">
|
||||
<Set name="serverName">localhost</Set>
|
||||
<Set name="databaseName">users</Set>
|
||||
<Set name="user">postgres</Set>
|
||||
<Set name="password">sparky</Set>
|
||||
</New>
|
||||
</Arg>
|
||||
</New>
|
||||
<New id="shutdown" class="org.mortbay.jetty.plus.naming.Resource">
|
||||
<Arg>jdbc/shutdown</Arg>
|
||||
<Arg>
|
||||
<New class="org.postgresql.ds.PGPoolingDataSource">
|
||||
<Set name="serverName">localhost</Set>
|
||||
<Set name="databaseName">users</Set>
|
||||
<Set name="user">postgres</Set>
|
||||
<Set name="password">sparky</Set>
|
||||
</New>
|
||||
</Arg>
|
||||
</New>
|
||||
|
||||
</Configure>
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
~ Copyright 2005-2006 The Apache Software Foundation.
|
||||
~
|
||||
~ Licensed 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 Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
|
||||
<Configure class="org.mortbay.jetty.webapp.WebAppContext">
|
||||
|
||||
<New id="validation_mail" class="org.mortbay.jetty.plus.naming.Resource">
|
||||
<Arg>mail/Session</Arg>
|
||||
<Arg>
|
||||
<New class="org.mortbay.naming.factories.MailSessionReference">
|
||||
<Set name="user"></Set>
|
||||
<Set name="password"></Set>
|
||||
<Set name="properties">
|
||||
<New class="java.util.Properties">
|
||||
<Put name="mail.smtp.host">localhost</Put>
|
||||
<Put name="mail.from">continuum@localhost</Put>
|
||||
<Put name="mail.senderName">Continuum</Put>
|
||||
<Put name="mail.debug">true</Put>
|
||||
</New>
|
||||
</Set>
|
||||
</New>
|
||||
</Arg>
|
||||
</New>
|
||||
|
||||
<New id="users" class="org.mortbay.jetty.plus.naming.Resource">
|
||||
<Arg>jdbc/users</Arg>
|
||||
<Arg>
|
||||
<New class="org.apache.derby.jdbc.EmbeddedDataSource">
|
||||
<Set name="DatabaseName">target/database</Set>
|
||||
<Set name="user">sa</Set>
|
||||
<Set name="createDatabase">create</Set>
|
||||
</New>
|
||||
</Arg>
|
||||
</New>
|
||||
<New id="shutdown" class="org.mortbay.jetty.plus.naming.Resource">
|
||||
<Arg>jdbc/shutdown</Arg>
|
||||
<Arg>
|
||||
<New class="org.apache.derby.jdbc.EmbeddedDataSource">
|
||||
<Set name="DatabaseName">target/database</Set>
|
||||
<Set name="user">sa</Set>
|
||||
<Set name="shutdownDatabase">shutdown</Set>
|
||||
</New>
|
||||
</Arg>
|
||||
</New>
|
||||
|
||||
</Configure>
|
||||
|
|
@ -1,132 +0,0 @@
|
|||
package org.codehaus.plexus.redback.example.web;
|
||||
|
||||
/*
|
||||
* Copyright 2001-2006 The Codehaus.
|
||||
*
|
||||
* Licensed 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.
|
||||
*/
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.codehaus.plexus.redback.policy.UserSecurityPolicy;
|
||||
import org.codehaus.plexus.redback.role.RoleManager;
|
||||
import org.codehaus.plexus.redback.role.RoleManagerException;
|
||||
import org.codehaus.plexus.redback.system.SecuritySystem;
|
||||
import org.codehaus.plexus.redback.system.check.EnvironmentCheck;
|
||||
import org.codehaus.plexus.redback.users.User;
|
||||
import org.codehaus.plexus.redback.users.UserManager;
|
||||
import org.codehaus.plexus.redback.users.UserNotFoundException;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
/**
|
||||
* TestUsersEnvironmentCheck
|
||||
*
|
||||
* @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
|
||||
* @version $Id$
|
||||
*/
|
||||
@Controller("test-users-check")
|
||||
@Scope("prototype")
|
||||
public class TestUsersEnvironmentCheck
|
||||
implements EnvironmentCheck
|
||||
{
|
||||
private Logger log = LoggerFactory.getLogger( TestUsersEnvironmentCheck.class );
|
||||
|
||||
@Inject
|
||||
private RoleManager roleManager;
|
||||
|
||||
@Inject
|
||||
private SecuritySystem securitySystem;
|
||||
|
||||
/**
|
||||
* boolean detailing if this environment check has been executed
|
||||
*/
|
||||
private boolean checked = true;
|
||||
|
||||
private void createUser( String username, String fullname, String email, String password, boolean locked,
|
||||
boolean validated )
|
||||
{
|
||||
UserManager userManager = securitySystem.getUserManager();
|
||||
UserSecurityPolicy policy = securitySystem.getPolicy();
|
||||
|
||||
User user;
|
||||
|
||||
try
|
||||
{
|
||||
user = userManager.findUser( username );
|
||||
}
|
||||
catch ( UserNotFoundException e )
|
||||
{
|
||||
policy.setEnabled( false );
|
||||
user = userManager.createUser( username, fullname, email );
|
||||
user.setPassword( password );
|
||||
user.setLocked( locked );
|
||||
user.setValidated( validated );
|
||||
user = userManager.addUser( user );
|
||||
}
|
||||
finally
|
||||
{
|
||||
policy.setEnabled( true );
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
roleManager.assignRole( "registered-user", user.getPrincipal().toString() );
|
||||
}
|
||||
catch ( RoleManagerException e )
|
||||
{
|
||||
log.warn( "Unable to set role: ", e );
|
||||
}
|
||||
}
|
||||
|
||||
public void validateEnvironment( List<String> violations )
|
||||
{
|
||||
|
||||
if ( !checked )
|
||||
{
|
||||
createUser( "testuser1", "Test User 1", "test.user@gmail.com", "pass123", false, true );
|
||||
createUser( "testuser2", "Test User 2", "test,user.2@gmail.com", "pass123", false, true );
|
||||
|
||||
// Intentionally create bad users to test CSV reporting
|
||||
createUser( "csvtest1", "CSV Test \"User\" 1", "csv.1@gmail.com", "pass123", false, false );
|
||||
createUser( "csvtest2", "CSV Test \t'Pau 2", "csv.2@gmail.com", "pass123", false, true );
|
||||
createUser( "csvtest3", "CSV Test User \next Generation 3", "csv.3@gmail.com", "pass123", true, true );
|
||||
|
||||
// Filmed On Location
|
||||
createUser( "amy", "Amy Wong", "amy@kapa.kapa.wong.mars", "guh!", false, true );
|
||||
createUser( "bender", "Bender Bending Rodriguez", "bender@planetexpress.com", "elzarRox",
|
||||
false, true );
|
||||
createUser( "leela", "Turanga Leela", "leela@planetexpress.com", "orphanarium",
|
||||
false, true );
|
||||
createUser( "fry", "Philip J. Fry", "fry@planetexpress.com", "cool", false, true );
|
||||
createUser( "kif", "Kif Krooker", "kif@nimbus.doop.mil", "sigh", false, true );
|
||||
createUser( "zapp", "Zapp Brannigan", "zapp@nimbus.doop.mil", "leela", false, false );
|
||||
createUser( "elzar", "Elzar", "elzar@elzarscuisine.com", "BAM!", false, true );
|
||||
createUser( "mom", "Mom", "mom@momsfriendlyrobotcompany.com", "heartless", false, true );
|
||||
createUser( "nibbler", "Lord Nibbler", "nibbler@planetexpress.com", "growl", false, false );
|
||||
createUser( "hermes", "Hermes Conrad", "hermes@bureaucrat.planetexpress.com", "groovy",
|
||||
false, true );
|
||||
createUser( "hubert", "Professor Hubert J. Farnsworth", "owner@planetexpress.com",
|
||||
"doomsday", false, true );
|
||||
createUser( "zoidberg", "Dr. John Zoidberg", "doctor@planetexpress.com", "sayargh",
|
||||
true, false );
|
||||
|
||||
checked = true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -1,92 +0,0 @@
|
|||
package org.codehaus.plexus.redback.example.web.action;
|
||||
|
||||
/*
|
||||
* Copyright 2001-2006 The Apache Software Foundation.
|
||||
*
|
||||
* Licensed 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.
|
||||
*/
|
||||
|
||||
import org.codehaus.plexus.redback.role.RoleManager;
|
||||
import org.codehaus.plexus.redback.role.RoleManagerException;
|
||||
import org.codehaus.plexus.redback.struts2.action.RedbackActionSupport;
|
||||
import org.codehaus.plexus.redback.system.SecuritySystem;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
/**
|
||||
* MainAction
|
||||
*
|
||||
* @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
|
||||
* @version $Id$
|
||||
*/
|
||||
@Controller( "main" )
|
||||
@Scope( "prototype" )
|
||||
public class MainAction
|
||||
extends RedbackActionSupport
|
||||
{
|
||||
@Inject
|
||||
private SecuritySystem securitySystem;
|
||||
|
||||
@Inject
|
||||
private RoleManager roleManager;
|
||||
|
||||
public String show()
|
||||
{
|
||||
if ( securitySystem == null )
|
||||
{
|
||||
session.put( "SecuritySystemWARNING", "SecuritySystem is null!" );
|
||||
}
|
||||
else
|
||||
{
|
||||
session.put( "security_id_authenticator", securitySystem.getAuthenticatorId() );
|
||||
session.put( "security_id_authorizor", securitySystem.getAuthorizerId() );
|
||||
session.put( "security_id_user_management", securitySystem.getUserManagementId() );
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
if ( !roleManager.templatedRoleExists( "template1", "Test Resource A" ) )
|
||||
{
|
||||
roleManager.createTemplatedRole( "template1", "Test Resource A" );
|
||||
}
|
||||
if ( !roleManager.templatedRoleExists( "template2", "Test Resource A" ) )
|
||||
{
|
||||
roleManager.createTemplatedRole( "template2", "Test Resource A" );
|
||||
}
|
||||
if ( !roleManager.templatedRoleExists( "template3", "Test Resource A" ) )
|
||||
{
|
||||
roleManager.createTemplatedRole( "template3", "Test Resource A" );
|
||||
}
|
||||
if ( !roleManager.templatedRoleExists( "template1", "Test Resource B" ) )
|
||||
{
|
||||
roleManager.createTemplatedRole( "template1", "Test Resource B" );
|
||||
}
|
||||
if ( !roleManager.templatedRoleExists( "template2", "Test Resource B" ) )
|
||||
{
|
||||
roleManager.createTemplatedRole( "template2", "Test Resource B" );
|
||||
}
|
||||
if ( !roleManager.templatedRoleExists( "template3", "Test Resource B" ) )
|
||||
{
|
||||
roleManager.createTemplatedRole( "template3", "Test Resource B" );
|
||||
}
|
||||
}
|
||||
catch ( RoleManagerException e )
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
return SUCCESS;
|
||||
}
|
||||
}
|
|
@ -1,39 +0,0 @@
|
|||
package org.codehaus.plexus.redback.example.web.action;
|
||||
|
||||
/*
|
||||
* Copyright 2001-2006 The Apache Software Foundation.
|
||||
*
|
||||
* Licensed 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.
|
||||
*/
|
||||
|
||||
import org.codehaus.plexus.redback.struts2.action.RedbackActionSupport;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
||||
/**
|
||||
* PlexusSecuritySystemAction:
|
||||
*
|
||||
* @author Jesse McConnell <jesse@codehaus.org>
|
||||
* @version $Id$
|
||||
*/
|
||||
@Controller("status")
|
||||
@Scope("prototype")
|
||||
public class StatusAction
|
||||
extends RedbackActionSupport
|
||||
{
|
||||
|
||||
public String status()
|
||||
{
|
||||
return SUCCESS;
|
||||
}
|
||||
}
|
|
@ -1,73 +0,0 @@
|
|||
<redback-role-model>
|
||||
<modelVersion>1.0.0</modelVersion>
|
||||
<applications>
|
||||
<application>
|
||||
<id>Redback</id>
|
||||
<version>1.0</version>
|
||||
<operations>
|
||||
<operation>
|
||||
<id>redback-operation-1</id>
|
||||
<name>redback-operation-1</name>
|
||||
<description>Redback Operation 1</description>
|
||||
</operation>
|
||||
<operation>
|
||||
<id>redback-operation-2</id>
|
||||
<name>redback-operation-2</name>
|
||||
<description>Redback Operation 2</description>
|
||||
</operation>
|
||||
<operation>
|
||||
<id>redback-operation-3</id>
|
||||
<name>redback-operation-3</name>
|
||||
<description>Redback Operation 3</description>
|
||||
</operation>
|
||||
</operations>
|
||||
<templates>
|
||||
<template>
|
||||
<id>template1</id>
|
||||
<namePrefix>Template1</namePrefix>
|
||||
<assignable>true</assignable>
|
||||
<permissions>
|
||||
<permission>
|
||||
<id>permission-1</id>
|
||||
<name>Permission 1</name>
|
||||
<operation>redback-operation-1</operation>
|
||||
<resource>${resource}</resource>
|
||||
</permission>
|
||||
</permissions>
|
||||
</template>
|
||||
<template>
|
||||
<id>template2</id>
|
||||
<namePrefix>Template2</namePrefix>
|
||||
<assignable>true</assignable>
|
||||
<permissions>
|
||||
<permission>
|
||||
<id>permission-2</id>
|
||||
<name>Permission 2</name>
|
||||
<operation>redback-operation-2</operation>
|
||||
<resource>${resource}</resource>
|
||||
</permission>
|
||||
</permissions>
|
||||
<childTemplates>
|
||||
<childTemplate>template1</childTemplate>
|
||||
</childTemplates>
|
||||
</template>
|
||||
<template>
|
||||
<id>template3</id>
|
||||
<namePrefix>Template3</namePrefix>
|
||||
<assignable>true</assignable>
|
||||
<permissions>
|
||||
<permission>
|
||||
<id>permission-3</id>
|
||||
<name>Permission 3</name>
|
||||
<operation>redback-operation-3</operation>
|
||||
<resource>${resource}</resource>
|
||||
</permission>
|
||||
</permissions>
|
||||
<childTemplates>
|
||||
<childTemplate>template2</childTemplate>
|
||||
</childTemplates>
|
||||
</template>
|
||||
</templates>
|
||||
</application>
|
||||
</applications>
|
||||
</redback-role-model>
|
|
@ -1,13 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
|
||||
|
||||
<context:annotation-config />
|
||||
<context:component-scan base-package="org.codehaus.plexus.redback.example.web"/>
|
||||
|
||||
</beans>
|
|
@ -1,35 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
|
||||
|
||||
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="true">
|
||||
|
||||
<appender name="outputLog" class="org.apache.log4j.DailyRollingFileAppender">
|
||||
<param name="file" value="${appserver.base}/logs/redback.log" />
|
||||
<param name="append" value="true" />
|
||||
<param name="datePattern" value="'.'yyyy-MM-dd" />
|
||||
<layout class="org.apache.log4j.PatternLayout">
|
||||
<param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss} [%t] %-5p %c %x - %m%n"/>
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<appender name="auditLog" class="org.apache.log4j.DailyRollingFileAppender">
|
||||
<param name="file" value="${appserver.base}/logs/redback-audit.log" />
|
||||
<param name="append" value="true" />
|
||||
<param name="datePattern" value="'.'yyyy-MM-dd" />
|
||||
<layout class="org.apache.log4j.PatternLayout">
|
||||
<param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss} - %X{redback.currentUser} - %m%n"/>
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<logger name="org.codehaus.plexus.redback.struts2.action.AuditEvent" additivity="false">
|
||||
<level value="info" />
|
||||
<appender-ref ref="auditLog" />
|
||||
</logger>
|
||||
|
||||
<root>
|
||||
<priority value="info" />
|
||||
<appender-ref ref="outputLog" />
|
||||
</root>
|
||||
|
||||
</log4j:configuration>
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
#struts.objectFactory = org.codehaus.plexus.xwork.PlexusObjectFactory
|
||||
#struts.tag.altSyntax = true
|
||||
|
||||
#struts.objectFactory = org.codehaus.plexus.spring.Struts2PlexusInSpringObjectFactory
|
||||
|
||||
struts.objectFactory = org.apache.struts2.spring.StrutsSpringObjectFactory
|
||||
struts.objectFactory.spring.autoWire = type
|
||||
|
||||
# Theme
|
||||
struts.ui.theme = xhtml
|
||||
|
||||
struts.devMode = true
|
||||
|
||||
# Locale
|
||||
#struts.locale=en_EN
|
||||
|
||||
# Upload
|
||||
#struts.multipart.parser = jakarta
|
||||
# default saveDir is defined by javax.servlet.context.tempdir property
|
||||
#struts.multipart.saveDir =
|
||||
# default max size is 2097152 (2MB)
|
||||
#struts.multipart.maxSize =
|
||||
|
||||
# Localization
|
||||
struts.custom.i18n.resources=org.codehaus.plexus.redback.struts2.default,org.codehaus.plexus.redback.example.custom
|
|
@ -1,79 +0,0 @@
|
|||
<!DOCTYPE struts PUBLIC
|
||||
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.0.dtd">
|
||||
|
||||
<struts>
|
||||
<include file="struts-security.xml"/>
|
||||
|
||||
<!-- ==================================================================
|
||||
Application Webapp Specific Configuration.
|
||||
================================================================== -->
|
||||
|
||||
<constant name="struts.action.extension" value="action" />
|
||||
|
||||
<package name="root" extends="struts-default" namespace="/">
|
||||
<interceptors>
|
||||
<interceptor name="redbackForceAdminUser" class="redbackForceAdminUserInterceptor"/>
|
||||
<interceptor name="redbackEnvCheck" class="redbackEnvironmentCheckInterceptor"/>
|
||||
<interceptor name="redbackAutoLogin" class="redbackAutoLoginInterceptor"/>
|
||||
<interceptor name="redbackSecureActions" class="redbackSecureActionInterceptor"/>
|
||||
<interceptor name="redbackPolicyEnforcement" class="redbackPolicyEnforcementInterceptor"/>
|
||||
<interceptor-stack name="securedStack">
|
||||
<interceptor-ref name="defaultStack"/>
|
||||
<interceptor-ref name="redbackEnvCheck"/>
|
||||
<interceptor-ref name="redbackForceAdminUser"/>
|
||||
<interceptor-ref name="redbackAutoLogin"/>
|
||||
<interceptor-ref name="redbackPolicyEnforcement"/>
|
||||
<interceptor-ref name="redbackSecureActions"/>
|
||||
<interceptor-ref name="tokenSession">
|
||||
<param name="excludeMethods">*</param>
|
||||
</interceptor-ref>
|
||||
</interceptor-stack>
|
||||
<interceptor-stack name="securedPrepareParamsStack">
|
||||
<interceptor-ref name="paramsPrepareParamsStack"/>
|
||||
<interceptor-ref name="redbackEnvCheck"/>
|
||||
<interceptor-ref name="redbackForceAdminUser"/>
|
||||
<interceptor-ref name="redbackAutoLogin"/>
|
||||
<interceptor-ref name="redbackPolicyEnforcement"/>
|
||||
<interceptor-ref name="redbackSecureActions"/>
|
||||
</interceptor-stack>
|
||||
</interceptors>
|
||||
|
||||
<default-interceptor-ref name="securedStack"/>
|
||||
|
||||
<global-results>
|
||||
<result name="security-login-success" type="redirectAction">main</result>
|
||||
<result name="security-login-cancel" type="redirectAction">main</result>
|
||||
<result name="security-login-locked" type="redirectAction">main</result>
|
||||
<result name="security-logout" type="redirectAction">main</result>
|
||||
<result name="security-register-success" type="redirectAction">main</result>
|
||||
<result name="security-register-cancel" type="redirectAction">main</result>
|
||||
<result name="security-account-success" type="redirectAction">main</result>
|
||||
<result name="security-account-cancel" type="redirectAction">main</result>
|
||||
|
||||
<result name="security-admin-user-needed" type="redirectAction">
|
||||
<param name="actionName">addadmin</param>
|
||||
<param name="namespace">/security</param>
|
||||
</result>
|
||||
|
||||
<result name="security-must-change-password" type="redirectAction">
|
||||
<param name="actionName">password</param>
|
||||
<param name="namespace">/security</param>
|
||||
</result>
|
||||
|
||||
<result name="error">/WEB-INF/jsp/redback/generalError.jsp</result>
|
||||
<result name="invalid.token">/WEB-INF/jsp/redback/invalidToken.jsp</result>
|
||||
<result name="requires-authentication">/WEB-INF/jsp/requiresAuthentication.jsp</result>
|
||||
<result name="requires-authorization">/WEB-INF/jsp/accessDenied.jsp</result>
|
||||
</global-results>
|
||||
|
||||
<action name="redbackRedirect" class="redback-redirect" method="redirect">
|
||||
<result type="redirectAction">main</result>
|
||||
</action>
|
||||
|
||||
<action name="main" class="main" method="show">
|
||||
<result name="success">/WEB-INF/jsp/mainpage.jsp</result>
|
||||
</action>
|
||||
|
||||
</package>
|
||||
</struts>
|
|
@ -1,84 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
|
||||
|
||||
<context:property-placeholder system-properties-mode="OVERRIDE"/>
|
||||
|
||||
<bean id="mailSession" class="org.springframework.jndi.JndiObjectFactoryBean">
|
||||
<property name="jndiName" value="java:comp/env/mail/Session">
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean name="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl">
|
||||
<property name="session" ref="mailSession"/>
|
||||
</bean>
|
||||
|
||||
<bean id="loginService" class="org.codehaus.redback.xmlrpc.service.LoginServiceImpl">
|
||||
<constructor-arg ref="securitySystem" />
|
||||
</bean>
|
||||
|
||||
<bean name="xmlrpcServicesList" class="java.util.ArrayList">
|
||||
<constructor-arg>
|
||||
<list>
|
||||
<ref bean="loginService" />
|
||||
</list>
|
||||
</constructor-arg>
|
||||
</bean>
|
||||
|
||||
<bean name="userConfiguration" class="org.codehaus.plexus.redback.configuration.UserConfiguration">
|
||||
<property name="configs">
|
||||
<list>
|
||||
<value>${user.home}/.m2/security.properties</value>
|
||||
<value>${user.home}/.m2/security-example.properties</value>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!--
|
||||
|
||||
this is default component so no need to override
|
||||
<component>
|
||||
<role>org.codehaus.plexus.redback.policy.UserSecurityPolicy</role>
|
||||
<role-hint>default</role-hint>
|
||||
<implementation>org.codehaus.plexus.redback.policy.DefaultUserSecurityPolicy</implementation>
|
||||
<description>User Security Policy.</description>
|
||||
<requirements>
|
||||
<requirement>
|
||||
<role>org.codehaus.plexus.redback.configuration.UserConfiguration</role>
|
||||
<field-name>config</field-name>
|
||||
</requirement>
|
||||
<requirement>
|
||||
<role>org.codehaus.plexus.redback.policy.PasswordEncoder</role>
|
||||
<role-hint>sha1</role-hint>
|
||||
<field-name>passwordEncoder</field-name>
|
||||
</requirement>
|
||||
<requirement>
|
||||
<role>org.codehaus.plexus.redback.policy.UserValidationSettings</role>
|
||||
<field-name>userValidationSettings</field-name>
|
||||
</requirement>
|
||||
<requirement>
|
||||
<role>org.codehaus.plexus.redback.policy.CookieSettings</role>
|
||||
<role-hint>rememberMe</role-hint>
|
||||
<field-name>rememberMeCookieSettings</field-name>
|
||||
</requirement>
|
||||
<requirement>
|
||||
<role>org.codehaus.plexus.redback.policy.CookieSettings</role>
|
||||
<role-hint>signon</role-hint>
|
||||
<field-name>signonCookieSettings</field-name>
|
||||
</requirement>
|
||||
<requirement>
|
||||
<role>org.codehaus.plexus.redback.policy.PasswordRule</role>
|
||||
<field-name>rules</field-name>
|
||||
</requirement>
|
||||
</requirements>
|
||||
</component>
|
||||
</components>
|
||||
|
||||
-->
|
||||
|
||||
</beans>
|
|
@ -1,21 +0,0 @@
|
|||
<!--
|
||||
~ Copyright 2005-2006 The Apache Software Foundation.
|
||||
~
|
||||
~ Licensed 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.
|
||||
-->
|
||||
|
||||
<decorators defaultdir="/WEB-INF/jsp/decorators">
|
||||
<decorator name="default" page="default.jsp">
|
||||
<pattern>/*</pattern>
|
||||
</decorator>
|
||||
</decorators>
|
|
@ -1,177 +0,0 @@
|
|||
<%--
|
||||
~ Copyright 2005-2006 The Codehaus.
|
||||
~
|
||||
~ Licensed 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 uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator" %>
|
||||
<%@ taglib uri="/struts-tags" prefix="s" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
|
||||
<%@ taglib prefix="redback" uri="/redback/taglib-1.0" %>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Redback Struts2 Example Webapp ::
|
||||
<decorator:title default="Redback Struts2 Example Webapp"/>
|
||||
</title>
|
||||
|
||||
<style type="text/css" media="all">
|
||||
@IMPORT url("/css/main.css");
|
||||
@IMPORT url("/css/redback/table.css");
|
||||
</style>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
|
||||
</head>
|
||||
|
||||
<body onload="<decorator:getProperty property="body.onload" />" class="composite">
|
||||
|
||||
<div id="banner">
|
||||
<s:url id="main" action="main" namespace="/" includeParams="none"/>
|
||||
<h1><s:a href="%{main}">Redback Struts2 Example Webapp</s:a></h1>
|
||||
<div class="clear">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="breadcrumbs">
|
||||
<div class="xright">
|
||||
<a href="http://www.codehaus.org/">Codehaus</a> |
|
||||
<a href="http://redback.codehaus.org/">Redback</a>
|
||||
</div>
|
||||
|
||||
<div class="xleft">
|
||||
<c:import url="/WEB-INF/jsp/redback/include/securityLinks.jsp"/>
|
||||
</div>
|
||||
|
||||
<div class="clear">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="note">
|
||||
Guest access is :
|
||||
<redback:ifAuthorized permission="guest-access">
|
||||
<b>Enabled</b>
|
||||
</redback:ifAuthorized>
|
||||
<redback:elseAuthorized>
|
||||
<b>Disabled</b>
|
||||
</redback:elseAuthorized>
|
||||
</p>
|
||||
|
||||
<p class="note">
|
||||
<c:if test="${sessionScope.securitySession.user != null}">
|
||||
Encoded Password: <c:out value="${sessionScope.securitySession.user.encodedPassword}"/><br/>
|
||||
Password Change Required Password: <c:out value="${sessionScope.securitySession.user.passwordChangeRequired}"/>
|
||||
</c:if>
|
||||
</p>
|
||||
|
||||
|
||||
<p class="note">The gray content is arriving via the /WEB-INF/jsp/decorators/default.jsp managed by sitemesh.<br/>
|
||||
Everything within the white box below is the actual jsp content.</p>
|
||||
<div id="nestedContent">
|
||||
<decorator:body/>
|
||||
</div>
|
||||
|
||||
<div id="xworkinfo">
|
||||
|
||||
<%--
|
||||
<strong>application scope:</strong>
|
||||
<ul>
|
||||
<c:choose>
|
||||
<c:when test="${!empty applicationScope}">
|
||||
<c:forEach var="ss" items="${applicationScope}">
|
||||
<li>
|
||||
<em><c:out value="${ss.key}" /></em> :
|
||||
<c:choose>
|
||||
<c:when test="${ss != null}">
|
||||
(<c:out value="${ss.value.class.name}" /> ) <br />
|
||||
<c:out value="${ss.value}" />
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<null>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</li>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<li>[ empty ]</li>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</ul>
|
||||
--%>
|
||||
|
||||
<strong>session scope:</strong>
|
||||
<ul>
|
||||
<c:forEach var="ss" items="${sessionScope}">
|
||||
<li>
|
||||
<em><c:out value="${ss.key}" /></em> :
|
||||
<c:choose>
|
||||
<c:when test="${ss.value != null}">
|
||||
(<c:out value="${ss.value.class.name}" /> ) <br />
|
||||
<c:out value="${ss.value}" />
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<null>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</li>
|
||||
</c:forEach>
|
||||
</ul>
|
||||
|
||||
<strong>request scope:</strong>
|
||||
<ul>
|
||||
<c:forEach var="rs" items="${requestScope}">
|
||||
<li>
|
||||
<em><c:out value="${rs.key}" /></em> :
|
||||
<c:choose>
|
||||
<c:when test="${rs.value != null}">
|
||||
(<c:out value="${rs.value.class.name}" /> ) <br />
|
||||
<c:out value="${rs.value}" />
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<null>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</li>
|
||||
</c:forEach>
|
||||
</ul>
|
||||
|
||||
<strong>page scope:</strong>
|
||||
<ul>
|
||||
<c:forEach var="ps" items="${requestScope}">
|
||||
<li>
|
||||
<em><c:out value="${ps.key}" /></em> :
|
||||
<c:choose>
|
||||
<c:when test="${ps.value != null}">
|
||||
(<c:out value="${ps.value.class.name}" /> ) <br />
|
||||
<c:out value="${ps.value}" />
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<null>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</li>
|
||||
</c:forEach>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clear">
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
<div class="xright">© 2006 Codehaus.org </div>
|
||||
<div class="clear">
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,81 +0,0 @@
|
|||
<%--
|
||||
~ Copyright 2005-2006 The Apache Software Foundation.
|
||||
~
|
||||
~ Licensed 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" %>
|
||||
<%@ taglib prefix="redback" uri="/redback/taglib-1.0" %>
|
||||
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>Redback Security Example Webapp</title>
|
||||
<s:head />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<h4>This is the example mainpage</h4>
|
||||
|
||||
<div id="results">
|
||||
<%-- This is where the "Account Created Successfully" type message goes. --%>
|
||||
<div class="success">
|
||||
<s:actionmessage />
|
||||
</div>
|
||||
<%-- This is where errors from the action and other non-form field specific errors appear. --%>
|
||||
<div class="errors">
|
||||
<s:actionerror />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ol>
|
||||
<li>
|
||||
<redback:ifAuthorized permission="user-management-manage-data">
|
||||
<p/>
|
||||
<s:url id="backupRestoreUrl" action="backupRestore" namespace="/security"/>
|
||||
<ul>
|
||||
<li>Go see the <s:a href="%{backupRestoreUrl}">backup-restore</s:a>.</li>
|
||||
</ul>
|
||||
</redback:ifAuthorized>
|
||||
|
||||
<redback:ifAuthorized permission="user-management-user-list">
|
||||
You are authorized to see this content!
|
||||
<p/>
|
||||
|
||||
<s:url id="userlistUrl" action="userlist" namespace="/security"/>
|
||||
<s:url id="rolesUrl" action="roles" namespace="/security"/>
|
||||
|
||||
<ul>
|
||||
<li>Go see the <s:a href="%{userlistUrl}">userlist</s:a>.</li>
|
||||
<li>Go see the <s:a href="%{rolesUrl}">roles</s:a>.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</redback:ifAuthorized>
|
||||
<redback:elseAuthorized>
|
||||
<redback:ifAuthorized permission="user-management-user-edit" resource="${sessionScope.securitySession.user.username}">
|
||||
Your logged in, you just don't have access to much...
|
||||
</redback:ifAuthorized>
|
||||
<redback:elseAuthorized>
|
||||
<s:url id="login" action="login" namespace="/security" />
|
||||
Go Ahead <s:a href="%{login}">Login.</s:a>
|
||||
</redback:elseAuthorized>
|
||||
</redback:elseAuthorized>
|
||||
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -1,107 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
~ Copyright 2005-2006 The Apache Software Foundation.
|
||||
~
|
||||
~ Licensed 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.
|
||||
-->
|
||||
|
||||
|
||||
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" version="2.4"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
|
||||
|
||||
<display-name>Plexus Redback Example Webapp</display-name>
|
||||
|
||||
<filter>
|
||||
<filter-name>struts2-cleanup</filter-name>
|
||||
<filter-class>org.apache.struts2.dispatcher.ActionContextCleanUp</filter-class>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<filter-name>sitemesh</filter-name>
|
||||
<filter-class>com.opensymphony.module.sitemesh.filter.PageFilter</filter-class>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<filter-name>struts2</filter-name>
|
||||
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
|
||||
</filter>
|
||||
|
||||
<filter-mapping>
|
||||
<filter-name>struts2-cleanup</filter-name>
|
||||
<url-pattern>/*</url-pattern>
|
||||
</filter-mapping>
|
||||
|
||||
<filter-mapping>
|
||||
<filter-name>sitemesh</filter-name>
|
||||
<url-pattern>/*</url-pattern>
|
||||
</filter-mapping>
|
||||
|
||||
<filter-mapping>
|
||||
<filter-name>struts2</filter-name>
|
||||
<url-pattern>/*</url-pattern>
|
||||
</filter-mapping>
|
||||
|
||||
|
||||
<context-param>
|
||||
<param-name>contextConfigLocation</param-name>
|
||||
<param-value>
|
||||
classpath*:META-INF/spring-context.xml
|
||||
/WEB-INF/applicationContext.xml
|
||||
</param-value>
|
||||
</context-param>
|
||||
|
||||
<listener>
|
||||
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
|
||||
</listener>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>RedbackXmlRpcServlet</servlet-name>
|
||||
<servlet-class>
|
||||
com.atlassian.xmlrpc.spring.BinderSpringXmlRpcServlet
|
||||
</servlet-class>
|
||||
<init-param>
|
||||
<param-name>serviceListBeanName</param-name>
|
||||
<param-value>xmlrpcServicesList</param-value>
|
||||
</init-param>
|
||||
<init-param>
|
||||
<param-name>enabledForExtensions</param-name>
|
||||
<param-value>true</param-value>
|
||||
</init-param>
|
||||
<load-on-startup>2</load-on-startup>
|
||||
</servlet>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>RedbackXmlRpcServlet</servlet-name>
|
||||
<url-pattern>/redback/xmlrpc</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>CXFServlet</servlet-name>
|
||||
<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
|
||||
<load-on-startup>1</load-on-startup>
|
||||
</servlet>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>CXFServlet</servlet-name>
|
||||
<url-pattern>/services/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<!--resource-ref>
|
||||
<res-ref-name>jdbc/users</res-ref-name>
|
||||
<res-type>javax.sql.DataSource</res-type>
|
||||
<res-auth>Container</res-auth>
|
||||
</resource-ref-->
|
||||
|
||||
</web-app>
|
|
@ -1,105 +0,0 @@
|
|||
body {
|
||||
background-color: #dddddd;
|
||||
color: #777777;
|
||||
}
|
||||
|
||||
.clear {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
#banner {
|
||||
background-color: #c0c0c0;
|
||||
padding: 10px 5px 0px 5px;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
#banner h1 {
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
#banner a {
|
||||
color: #888888;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#breadcrumbs {
|
||||
background-color: #cccccc;
|
||||
margin: 0px;
|
||||
font-size: 0.9em;
|
||||
padding: 5px;
|
||||
border-bottom: 1px solid #aaaaaa;
|
||||
}
|
||||
|
||||
#breadcrumbs a {
|
||||
color: #888888;
|
||||
}
|
||||
|
||||
#breadcrumbs .xright {
|
||||
float:right;
|
||||
}
|
||||
|
||||
.securityLinks {
|
||||
background-color: white;
|
||||
border: 1px solid black;
|
||||
padding: 2px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.securityLinks a {
|
||||
color: black !important;
|
||||
}
|
||||
|
||||
.securityLinks .admin {
|
||||
background-color: #ffdddd;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.securityLinks .admin a {
|
||||
color: red !important;
|
||||
}
|
||||
|
||||
#nestedContent {
|
||||
margin: 0px 30px 30px 30px;
|
||||
padding: 5px;
|
||||
border: 1px solid black;
|
||||
background-color: white;
|
||||
color: black;
|
||||
}
|
||||
|
||||
#nestedContent .wwFormTable .errorMessage {
|
||||
font-size: 0.8em;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
#xworkinfo {
|
||||
font-size: 0.7em;
|
||||
}
|
||||
|
||||
#footer {
|
||||
border-top: 1px solid #aaaaaa;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
#footer .xright {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.note {
|
||||
margin: 30px 0px 0px 30px;
|
||||
padding-bottom: 0px;
|
||||
font-size: 0.6em;
|
||||
color: gray;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.errorMessage,
|
||||
.errorLabel {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.required {
|
||||
color: red;
|
||||
}
|
||||
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
<%--
|
||||
~ Copyright 2005-2006 The Apache Software Foundation.
|
||||
~
|
||||
~ Licensed 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.
|
||||
--%>
|
||||
|
||||
<%response.sendRedirect( request.getContextPath() + "/main.action" );%>
|
|
@ -1,49 +0,0 @@
|
|||
<%@ taglib uri="/struts-tags" prefix="s" %>
|
||||
<%@ taglib uri="/redback/taglib-1.0" prefix="redback" %>
|
||||
<html>
|
||||
<head>
|
||||
<title>Redback Security Example Webapp</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
jsp tag test page
|
||||
</p>
|
||||
<hr/>
|
||||
<p>
|
||||
test of the jsp tag pss:ifAuthorized 1:<br/>
|
||||
<br/>
|
||||
you should see an X right here ->
|
||||
<redback:ifAuthorized permission="foo">
|
||||
X
|
||||
</redback:ifAuthorized>
|
||||
</p>
|
||||
<hr/>
|
||||
<p>
|
||||
test of the jsp tag redback:ifAuthorized 2:<br/>
|
||||
<br/>
|
||||
you should NOT see an X right here ->
|
||||
<redback:ifAuthorized permission="bar">
|
||||
X
|
||||
</redback:ifAuthorized>
|
||||
</p>
|
||||
<hr/>
|
||||
<p>
|
||||
test of the jsp tag redback:ifAnyAuthorized 3:<br/>
|
||||
<br/>
|
||||
you should see an X right here ->
|
||||
<redback:ifAnyAuthorized permissions="foo,bar">
|
||||
X
|
||||
</redback:ifAnyAuthorized>
|
||||
</p>
|
||||
<hr/>
|
||||
<p>
|
||||
test of the jsp tag redback:ifAnyAuthorized 4:<br/>
|
||||
<br/>
|
||||
you should NOT see an X right here ->
|
||||
<redback:ifAnyAuthorized permissions="bar,dor">
|
||||
X
|
||||
</redback:ifAnyAuthorized>
|
||||
</p>
|
||||
<hr/>
|
||||
</body>
|
||||
</html>
|
|
@ -1,39 +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 log4j:configuration SYSTEM "log4j.dtd">
|
||||
|
||||
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
|
||||
|
||||
<appender name="console" class="org.apache.log4j.ConsoleAppender">
|
||||
<layout class="org.apache.log4j.PatternLayout">
|
||||
<param name="ConversionPattern" value="%d [%t] %-5p %c %x - %m%n"/>
|
||||
</layout>
|
||||
</appender>
|
||||
<logger name="org.apache.commons.configuration.DefaultConfigurationBuilder">
|
||||
<level value="error"/>
|
||||
</logger>
|
||||
|
||||
<root>
|
||||
<priority value ="info" />
|
||||
<appender-ref ref="console" />
|
||||
</root>
|
||||
|
||||
</log4j:configuration>
|
|
@ -1,31 +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.
|
||||
-->
|
||||
<Context path="/">
|
||||
<Resource name="jdbc/users" auth="Container" type="javax.sql.DataSource"
|
||||
username="sa"
|
||||
password=""
|
||||
driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
|
||||
url="jdbc:derby:${catalina.base}/target/database/users;create=true"
|
||||
/>
|
||||
<Resource name="mail/Session" auth="Container"
|
||||
type="javax.mail.Session"
|
||||
mail.smtp.host="localhost"/>
|
||||
|
||||
</Context>
|
Loading…
Reference in New Issue