tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tveron...@apache.org
Subject svn commit: r1566034 - in /tomee/tomee/trunk/tomee/tomee-webaccess: ./ src/main/groovy/org/apache/tomee/webaccess/data/dto/ src/main/groovy/org/apache/tomee/webaccess/rest/ src/main/groovy/org/apache/tomee/webaccess/service/ src/main/webapp/WEB-INF/ sr...
Date Sat, 08 Feb 2014 15:51:45 GMT
Author: tveronezi
Date: Sat Feb  8 15:51:44 2014
New Revision: 1566034

URL: http://svn.apache.org/r1566034
Log:
https://issues.apache.org/jira/browse/TOMEE-1116
https://issues.apache.org/jira/browse/TOMEE-1117
https://issues.apache.org/jira/browse/TOMEE-1118

Added:
    tomee/tomee/trunk/tomee/tomee-webaccess/src/main/groovy/org/apache/tomee/webaccess/data/dto/AuthenticationResultDto.groovy
    tomee/tomee/trunk/tomee/tomee-webaccess/src/main/groovy/org/apache/tomee/webaccess/rest/Authentication.groovy
    tomee/tomee/trunk/tomee/tomee-webaccess/src/test/groovy/
    tomee/tomee/trunk/tomee/tomee-webaccess/src/test/groovy/org/
    tomee/tomee/trunk/tomee/tomee-webaccess/src/test/groovy/org/apache/
    tomee/tomee/trunk/tomee/tomee-webaccess/src/test/groovy/org/apache/tomee/
    tomee/tomee/trunk/tomee/tomee-webaccess/src/test/groovy/org/apache/tomee/webaccess/
    tomee/tomee/trunk/tomee/tomee-webaccess/src/test/groovy/org/apache/tomee/webaccess/test/
    tomee/tomee/trunk/tomee/tomee-webaccess/src/test/groovy/org/apache/tomee/webaccess/test/helpers/
    tomee/tomee/trunk/tomee/tomee-webaccess/src/test/groovy/org/apache/tomee/webaccess/test/helpers/Utilities.groovy
    tomee/tomee/trunk/tomee/tomee-webaccess/src/test/groovy/org/apache/tomee/webaccess/test/units/
    tomee/tomee/trunk/tomee/tomee-webaccess/src/test/groovy/org/apache/tomee/webaccess/test/units/LogTest.groovy
    tomee/tomee/trunk/tomee/tomee-webaccess/src/test/groovy/org/apache/tomee/webaccess/test/units/SessionTest.groovy
    tomee/tomee/trunk/tomee/tomee-webaccess/src/test/resources/arquillian.xml
    tomee/tomee/trunk/tomee/tomee-webaccess/src/test/resources/test/
    tomee/tomee/trunk/tomee/tomee-webaccess/src/test/resources/test/context.xml
    tomee/tomee/trunk/tomee/tomee-webaccess/src/test/resources/test/log/
    tomee/tomee/trunk/tomee/tomee-webaccess/src/test/resources/test/login.config
    tomee/tomee/trunk/tomee/tomee-webaccess/src/test/resources/test/loginScript.js
Removed:
    tomee/tomee/trunk/tomee/tomee-webaccess/src/main/groovy/org/apache/tomee/webaccess/rest/WebServices.groovy
    tomee/tomee/trunk/tomee/tomee-webaccess/src/main/groovy/org/apache/tomee/webaccess/service/WsServiceImpl.groovy
    tomee/tomee/trunk/tomee/tomee-webaccess/src/test/javascript/
Modified:
    tomee/tomee/trunk/tomee/tomee-webaccess/pom.xml
    tomee/tomee/trunk/tomee/tomee-webaccess/src/main/groovy/org/apache/tomee/webaccess/rest/ApplicationConfig.groovy
    tomee/tomee/trunk/tomee/tomee-webaccess/src/main/groovy/org/apache/tomee/webaccess/rest/KeepAlive.groovy
    tomee/tomee/trunk/tomee/tomee-webaccess/src/main/groovy/org/apache/tomee/webaccess/rest/Log.groovy
    tomee/tomee/trunk/tomee/tomee-webaccess/src/main/groovy/org/apache/tomee/webaccess/rest/Scripting.groovy
    tomee/tomee/trunk/tomee/tomee-webaccess/src/main/groovy/org/apache/tomee/webaccess/rest/Session.groovy
    tomee/tomee/trunk/tomee/tomee-webaccess/src/main/groovy/org/apache/tomee/webaccess/service/LogServiceImpl.groovy
    tomee/tomee/trunk/tomee/tomee-webaccess/src/main/groovy/org/apache/tomee/webaccess/service/ScriptingServiceImpl.groovy
    tomee/tomee/trunk/tomee/tomee-webaccess/src/main/groovy/org/apache/tomee/webaccess/service/SessionServiceImpl.groovy
    tomee/tomee/trunk/tomee/tomee-webaccess/src/main/webapp/WEB-INF/web.xml
    tomee/tomee/trunk/tomee/tomee-webaccess/src/main/webapp/app/app.less
    tomee/tomee/trunk/tomee/tomee-webaccess/src/main/webapp/app/js/templates/sessions.handlebars

Modified: tomee/tomee/trunk/tomee/tomee-webaccess/pom.xml
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/tomee/tomee-webaccess/pom.xml?rev=1566034&r1=1566033&r2=1566034&view=diff
==============================================================================
--- tomee/tomee/trunk/tomee/tomee-webaccess/pom.xml (original)
+++ tomee/tomee/trunk/tomee/tomee-webaccess/pom.xml Sat Feb  8 15:51:44 2014
@@ -31,8 +31,100 @@
     <javaee.api>6.0-5</javaee.api>
     <junit.version>4.10</junit.version>
   </properties>
+  <profiles>
+    <profile>
+      <id>tomee</id>
+      <activation>
+        <activeByDefault>true</activeByDefault>
+      </activation>
+    </profile>
+  </profiles>
+  <repositories>
+    <repository>
+      <id>sonatype.oss.releases</id>
+      <url>https://oss.sonatype.org/content/repositories/releases</url>
+    </repository>
+  </repositories>
+  <pluginRepositories>
+    <pluginRepository>
+      <id>sonatype.oss.releases</id>
+      <url>https://oss.sonatype.org/content/repositories/releases</url>
+    </pluginRepository>
+  </pluginRepositories>
+  <dependencyManagement>
+    <dependencies>
+      <dependency>
+        <groupId>org.jboss.shrinkwrap.resolver</groupId>
+        <artifactId>shrinkwrap-resolver-bom</artifactId>
+        <version>2.0.1</version>
+        <scope>import</scope>
+        <type>pom</type>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss.arquillian</groupId>
+        <artifactId>arquillian-bom</artifactId>
+        <version>1.1.2.Final</version>
+        <scope>import</scope>
+        <type>pom</type>
+      </dependency>
+    </dependencies>
+  </dependencyManagement>
   <dependencies>
     <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>${junit.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.openejb</groupId>
+      <artifactId>tomee-embedded</artifactId>
+      <version>${tomee.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.openejb</groupId>
+      <artifactId>openejb-cxf-rs</artifactId>
+      <version>${openejb.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.openejb</groupId>
+      <artifactId>arquillian-tomee-embedded</artifactId>
+      <version>${tomee.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.tomcat</groupId>
+      <artifactId>tomcat7-websocket</artifactId>
+      <version>${tomcat.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.openejb</groupId>
+      <artifactId>tomee-webservices</artifactId>
+      <version>${tomee.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.openejb</groupId>
+      <artifactId>ziplock</artifactId>
+      <version>${tomee.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>commons-io</groupId>
+      <artifactId>commons-io</artifactId>
+      <version>2.0.1</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.httpcomponents</groupId>
+      <artifactId>httpclient</artifactId>
+      <version>4.3.2</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
       <groupId>org.apache.openejb.staticweb</groupId>
       <artifactId>static-tomee-backbone</artifactId>
       <version>${project.version}</version>
@@ -92,12 +184,6 @@
       <version>1.7</version>
     </dependency>
     <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>${junit.version}</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
       <groupId>org.apache.openejb</groupId>
       <artifactId>openejb-core</artifactId>
       <version>${openejb.version}</version>
@@ -124,6 +210,17 @@
   <build>
     <plugins>
       <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <version>2.16</version>
+        <configuration>
+          <systemPropertyVariables>
+            <arquillian.tomee.path>${project.basedir}/target/arquillian-tomee</arquillian.tomee.path>
+            <java.security.auth.login.config>${project.basedir}/target/arquillian-tomee/conf/login.config</java.security.auth.login.config>
+          </systemPropertyVariables>
+        </configuration>
+      </plugin>
+      <plugin>
         <groupId>com.googlecode.jslint4java</groupId>
         <artifactId>jslint4java-maven-plugin</artifactId>
         <version>2.0.5</version>
@@ -176,6 +273,30 @@
           <tomeeClassifier>jaxrs</tomeeClassifier>
         </configuration>
       </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>codenarc-maven-plugin</artifactId>
+        <version>0.18-1</version>
+        <configuration>
+          <sourceDirectory>${project.basedir}/src/main/groovy</sourceDirectory>
+          <groovyVersion>2.0.0</groovyVersion>
+          <codeNarcVersion>0.20</codeNarcVersion>
+          <maxPriority1Violations>0</maxPriority1Violations>
+          <maxPriority2Violations>0</maxPriority2Violations>
+          <maxPriority3Violations>0</maxPriority3Violations>
+          <rulesetfiles>
+            rulesets/basic.xml,rulesets/exceptions.xml,rulesets/imports.xml,rulesets/unnecessary.xml,rulesets/convention.xml
+          </rulesetfiles>
+        </configuration>
+        <executions>
+          <execution>
+            <phase>test-compile</phase>
+            <goals>
+              <goal>codenarc</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
     </plugins>
   </build>
 </project>
\ No newline at end of file

Added: tomee/tomee/trunk/tomee/tomee-webaccess/src/main/groovy/org/apache/tomee/webaccess/data/dto/AuthenticationResultDto.groovy
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/tomee/tomee-webaccess/src/main/groovy/org/apache/tomee/webaccess/data/dto/AuthenticationResultDto.groovy?rev=1566034&view=auto
==============================================================================
--- tomee/tomee/trunk/tomee/tomee-webaccess/src/main/groovy/org/apache/tomee/webaccess/data/dto/AuthenticationResultDto.groovy
(added)
+++ tomee/tomee/trunk/tomee/tomee-webaccess/src/main/groovy/org/apache/tomee/webaccess/data/dto/AuthenticationResultDto.groovy
Sat Feb  8 15:51:44 2014
@@ -0,0 +1,38 @@
+/**
+ *
+ * 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.tomee.webaccess.data.dto
+
+import javax.xml.bind.annotation.XmlAccessType
+import javax.xml.bind.annotation.XmlAccessorType
+import javax.xml.bind.annotation.XmlElement
+import javax.xml.bind.annotation.XmlRootElement
+
+@XmlAccessorType(XmlAccessType.NONE)
+@XmlRootElement
+class AuthenticationResultDto {
+
+    @XmlElement
+    Boolean success
+
+    @XmlElement
+    String info
+
+    @XmlElement
+    String sessionId
+
+}

Modified: tomee/tomee/trunk/tomee/tomee-webaccess/src/main/groovy/org/apache/tomee/webaccess/rest/ApplicationConfig.groovy
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/tomee/tomee-webaccess/src/main/groovy/org/apache/tomee/webaccess/rest/ApplicationConfig.groovy?rev=1566034&r1=1566033&r2=1566034&view=diff
==============================================================================
--- tomee/tomee/trunk/tomee/tomee-webaccess/src/main/groovy/org/apache/tomee/webaccess/rest/ApplicationConfig.groovy
(original)
+++ tomee/tomee/trunk/tomee/tomee-webaccess/src/main/groovy/org/apache/tomee/webaccess/rest/ApplicationConfig.groovy
Sat Feb  8 15:51:44 2014
@@ -21,11 +21,11 @@ package org.apache.tomee.webaccess.rest
 import javax.ws.rs.ApplicationPath
 import javax.ws.rs.core.Application
 
-@ApplicationPath("/rest")
+@ApplicationPath('/rest')
 class ApplicationConfig extends Application {
 
     Set<Class<?>> getClasses() {
-        [KeepAlive, Log, Scripting, WebServices, Session]
+        [KeepAlive, Log, Scripting, Session, Authentication]
     }
 
 }

Added: tomee/tomee/trunk/tomee/tomee-webaccess/src/main/groovy/org/apache/tomee/webaccess/rest/Authentication.groovy
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/tomee/tomee-webaccess/src/main/groovy/org/apache/tomee/webaccess/rest/Authentication.groovy?rev=1566034&view=auto
==============================================================================
--- tomee/tomee/trunk/tomee/tomee-webaccess/src/main/groovy/org/apache/tomee/webaccess/rest/Authentication.groovy
(added)
+++ tomee/tomee/trunk/tomee/tomee-webaccess/src/main/groovy/org/apache/tomee/webaccess/rest/Authentication.groovy
Sat Feb  8 15:51:44 2014
@@ -0,0 +1,54 @@
+/**
+ *
+ * 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.tomee.webaccess.rest
+
+import org.apache.tomee.webaccess.data.dto.AuthenticationResultDto
+
+import javax.servlet.ServletException
+import javax.servlet.http.HttpServletRequest
+import javax.ws.rs.FormParam
+import javax.ws.rs.POST
+import javax.ws.rs.Path
+import javax.ws.rs.Produces
+import javax.ws.rs.core.Context
+
+@Path('/authentication')
+class Authentication {
+
+    @POST
+    @Produces('application/json')
+    AuthenticationResultDto postUser(
+            @FormParam('user') String user,
+            @FormParam('password') String password, @Context HttpServletRequest request)
{
+        def dto = new AuthenticationResultDto(
+                sessionId: request.session.id,
+                success: true
+        )
+        try {
+            request.login(user, password)
+            request.session.setAttribute('authenticated', Boolean.TRUE)
+        } catch (ServletException ignore) {
+            dto.success = false
+            dto.info = 'bad.username.or.password'
+            request.session.setAttribute('authenticated', Boolean.FALSE)
+        }
+        dto
+    }
+
+}

Modified: tomee/tomee/trunk/tomee/tomee-webaccess/src/main/groovy/org/apache/tomee/webaccess/rest/KeepAlive.groovy
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/tomee/tomee-webaccess/src/main/groovy/org/apache/tomee/webaccess/rest/KeepAlive.groovy?rev=1566034&r1=1566033&r2=1566034&view=diff
==============================================================================
--- tomee/tomee/trunk/tomee/tomee-webaccess/src/main/groovy/org/apache/tomee/webaccess/rest/KeepAlive.groovy
(original)
+++ tomee/tomee/trunk/tomee/tomee-webaccess/src/main/groovy/org/apache/tomee/webaccess/rest/KeepAlive.groovy
Sat Feb  8 15:51:44 2014
@@ -20,13 +20,14 @@ package org.apache.tomee.webaccess.rest
 
 import javax.ws.rs.GET
 import javax.ws.rs.Path
+import javax.ws.rs.core.Response
 
-@Path("/keep-alive")
+@Path('/keep-alive')
 class KeepAlive {
 
     @GET
-    void ping() {
-        // no-op
+    Response ping() {
+        Response.ok().build()
     }
 
 }

Modified: tomee/tomee/trunk/tomee/tomee-webaccess/src/main/groovy/org/apache/tomee/webaccess/rest/Log.groovy
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/tomee/tomee-webaccess/src/main/groovy/org/apache/tomee/webaccess/rest/Log.groovy?rev=1566034&r1=1566033&r2=1566034&view=diff
==============================================================================
--- tomee/tomee/trunk/tomee/tomee-webaccess/src/main/groovy/org/apache/tomee/webaccess/rest/Log.groovy
(original)
+++ tomee/tomee/trunk/tomee/tomee-webaccess/src/main/groovy/org/apache/tomee/webaccess/rest/Log.groovy
Sat Feb  8 15:51:44 2014
@@ -25,22 +25,22 @@ import org.apache.tomee.webaccess.servic
 import javax.ejb.EJB
 import javax.ws.rs.*
 
-@Path("/log")
+@Path('/log')
 class Log {
 
     @EJB
     private LogServiceImpl service
 
     @GET
-    @Path("/list-files")
-    @Produces("application/json")
+    @Path('/list-files')
+    @Produces('application/json')
     ListFilesResultDto execute(@FormParam('engine') String engine, @FormParam('script') String
script) {
         service.listFiles()
     }
 
     @GET
-    @Path("/load/{fileName}")
-    @Produces("application/json")
+    @Path('/load/{fileName}')
+    @Produces('application/json')
     LogFileResultDto load(@PathParam('fileName') String fileName) {
         service.load(fileName)
     }

Modified: tomee/tomee/trunk/tomee/tomee-webaccess/src/main/groovy/org/apache/tomee/webaccess/rest/Scripting.groovy
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/tomee/tomee-webaccess/src/main/groovy/org/apache/tomee/webaccess/rest/Scripting.groovy?rev=1566034&r1=1566033&r2=1566034&view=diff
==============================================================================
--- tomee/tomee/trunk/tomee/tomee-webaccess/src/main/groovy/org/apache/tomee/webaccess/rest/Scripting.groovy
(original)
+++ tomee/tomee/trunk/tomee/tomee-webaccess/src/main/groovy/org/apache/tomee/webaccess/rest/Scripting.groovy
Sat Feb  8 15:51:44 2014
@@ -27,14 +27,14 @@ import javax.ws.rs.POST
 import javax.ws.rs.Path
 import javax.ws.rs.Produces
 
-@Path("/scripting")
+@Path('/scripting')
 class Scripting {
 
     @EJB
     private ScriptingServiceImpl service
 
     @POST
-    @Produces("application/json")
+    @Produces('application/json')
     ScriptingResultDto execute(@FormParam('engine') String engine, @FormParam('script') String
script) {
         service.execute(engine, script)
     }

Modified: tomee/tomee/trunk/tomee/tomee-webaccess/src/main/groovy/org/apache/tomee/webaccess/rest/Session.groovy
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/tomee/tomee-webaccess/src/main/groovy/org/apache/tomee/webaccess/rest/Session.groovy?rev=1566034&r1=1566033&r2=1566034&view=diff
==============================================================================
--- tomee/tomee/trunk/tomee/tomee-webaccess/src/main/groovy/org/apache/tomee/webaccess/rest/Session.groovy
(original)
+++ tomee/tomee/trunk/tomee/tomee-webaccess/src/main/groovy/org/apache/tomee/webaccess/rest/Session.groovy
Sat Feb  8 15:51:44 2014
@@ -24,20 +24,20 @@ import org.apache.tomee.webaccess.servic
 import javax.ejb.EJB
 import javax.ws.rs.*
 
-@Path("/session")
+@Path('/session')
 class Session {
 
     @EJB
     private SessionServiceImpl service
 
     @DELETE
-    @Path("/expire/{context}/{sessionId}")
-    void expireSession(@PathParam("context") String context, @PathParam("sessionId") String
sessionId) {
+    @Path('/expire/{context}/{sessionId}')
+    void expireSession(@PathParam('context') String context, @PathParam('sessionId') String
sessionId) {
         service.expireSession(context, sessionId)
     }
 
     @GET
-    @Produces("application/json")
+    @Produces('application/json')
     List<SessionResultDto> list() {
         service.listSessions()
     }

Modified: tomee/tomee/trunk/tomee/tomee-webaccess/src/main/groovy/org/apache/tomee/webaccess/service/LogServiceImpl.groovy
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/tomee/tomee-webaccess/src/main/groovy/org/apache/tomee/webaccess/service/LogServiceImpl.groovy?rev=1566034&r1=1566033&r2=1566034&view=diff
==============================================================================
--- tomee/tomee/trunk/tomee/tomee-webaccess/src/main/groovy/org/apache/tomee/webaccess/service/LogServiceImpl.groovy
(original)
+++ tomee/tomee/trunk/tomee/tomee-webaccess/src/main/groovy/org/apache/tomee/webaccess/service/LogServiceImpl.groovy
Sat Feb  8 15:51:44 2014
@@ -31,27 +31,23 @@ import javax.ejb.TransactionAttributeTyp
 @RolesAllowed('tomee-admin')
 class LogServiceImpl {
 
-    static ListFilesResultDto listFiles() {
-        def logFolder = new File(System.getProperty("catalina.base"), "logs")
+    ListFilesResultDto listFiles() {
+        def logFolder = new File(System.getProperty('catalina.base'), 'logs')
         def files = logFolder.listFiles()
         def names = new TreeSet<String>()
-        files.each {
-            if (it.length() > 0) {
-                names << it.name
-            }
-        }
+        names.addAll(files.findAll({ it.length() > 0 })*.name)
         new ListFilesResultDto(
                 files: names
         )
     }
 
-    static LogFileResultDto load(String fileName) {
-        def logFolder = new File(System.getProperty("catalina.base"), "logs")
+    LogFileResultDto load(String fileName) {
+        def logFolder = new File(System.getProperty('catalina.base'), 'logs')
         def file = new File(logFolder, fileName)
         def text
         try {
             text = file.text
-        } catch (FileNotFoundException e) {
+        } catch (FileNotFoundException ignore) {
             text = "'$fileName' not found."
         }
         new LogFileResultDto(

Modified: tomee/tomee/trunk/tomee/tomee-webaccess/src/main/groovy/org/apache/tomee/webaccess/service/ScriptingServiceImpl.groovy
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/tomee/tomee-webaccess/src/main/groovy/org/apache/tomee/webaccess/service/ScriptingServiceImpl.groovy?rev=1566034&r1=1566033&r2=1566034&view=diff
==============================================================================
--- tomee/tomee/trunk/tomee/tomee-webaccess/src/main/groovy/org/apache/tomee/webaccess/service/ScriptingServiceImpl.groovy
(original)
+++ tomee/tomee/trunk/tomee/tomee-webaccess/src/main/groovy/org/apache/tomee/webaccess/service/ScriptingServiceImpl.groovy
Sat Feb  8 15:51:44 2014
@@ -32,7 +32,7 @@ import javax.script.SimpleScriptContext
 @RolesAllowed('tomee-admin')
 class ScriptingServiceImpl {
 
-    static ScriptingResultDto execute(String engine, String script) {
+    ScriptingResultDto execute(String engine, String script) {
         ScriptingResultDto result = new ScriptingResultDto(
                 output: ''
         )

Modified: tomee/tomee/trunk/tomee/tomee-webaccess/src/main/groovy/org/apache/tomee/webaccess/service/SessionServiceImpl.groovy
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/tomee/tomee-webaccess/src/main/groovy/org/apache/tomee/webaccess/service/SessionServiceImpl.groovy?rev=1566034&r1=1566033&r2=1566034&view=diff
==============================================================================
--- tomee/tomee/trunk/tomee/tomee-webaccess/src/main/groovy/org/apache/tomee/webaccess/service/SessionServiceImpl.groovy
(original)
+++ tomee/tomee/trunk/tomee/tomee-webaccess/src/main/groovy/org/apache/tomee/webaccess/service/SessionServiceImpl.groovy
Sat Feb  8 15:51:44 2014
@@ -33,36 +33,46 @@ import java.lang.management.ManagementFa
 @RolesAllowed('tomee-admin')
 class SessionServiceImpl {
 
-    static void expireSession(String context, String sessionId) {
-        def server = ManagementFactory.getPlatformMBeanServer()
+    void expireSession(String context, String sessionId) {
+        def server = ManagementFactory.platformMBeanServer
         def name = "Catalina:type=Manager,context=/$context,host=localhost" as String
         try {
             def contextBean = server.getObjectInstance(new ObjectName(name))
-            server.invoke(contextBean.objectName, 'expireSession', [sessionId] as Object[],
[String.class.name] as String[])
+            server.invoke(contextBean.objectName, 'expireSession', [sessionId] as Object[],
['java.lang.String'] as String[])
         } catch (InstanceNotFoundException ignore) {
             // no-op
         }
     }
 
-    static List<SessionResultDto> listSessions() {
-        def server = ManagementFactory.getPlatformMBeanServer()
-        def localhostBean = server.getObjectInstance(new ObjectName('Catalina:type=Host,host=localhost'))
+    List<SessionResultDto> listSessions() {
+        def server = ManagementFactory.platformMBeanServer
+        def localhostBean
+        def prefix = 'Catalina'
+        try {
+            localhostBean = server.getObjectInstance(new ObjectName("${prefix}:type=Host,host=localhost"))
+        } catch (InstanceNotFoundException ignore) {
+            prefix = 'Tomcat'
+            localhostBean = server.getObjectInstance(new ObjectName("${prefix}:type=Host,host=localhost"))
+        }
         def children = server.getAttribute(localhostBean.objectName, 'children')
         def baseNames = children.collect { ObjectName objectName ->
             server.getAttribute(objectName, 'baseName')
         }
         def result = []
         baseNames.each { baseName ->
-            def name = "Catalina:type=Manager,context=/$baseName,host=localhost" as String
+            def name = "${prefix}:type=Manager,context=/$baseName,host=localhost" as String
             try {
                 def contextBean = server.getObjectInstance(new ObjectName(name))
                 def maxInactiveInterval = server.getAttribute(contextBean.objectName, 'maxInactiveInterval')
as Long
-
                 def getValue = { String operationName, String sessionId ->
-                    server.invoke(contextBean.objectName, operationName, [sessionId] as Object[],
[String.class.name] as String[])
+                    try {
+                        server.invoke(contextBean.objectName, operationName, [sessionId]
as Object[], ['java.lang.String'] as String[])
+                    } catch (IllegalStateException ignore) {
+                        // Session invalidated. Just ignore it.
+                    }
                 }
-
-                server.invoke(contextBean.objectName, 'listSessionIds', null, null).split('
').each { String sessionId ->
+                String listSessionIds = server.invoke(contextBean.objectName, 'listSessionIds',
null, null)
+                listSessionIds.split(' ').each { String sessionId ->
                     if (sessionId != '') {
                         def accessedTs = getValue('getLastAccessedTimestamp', sessionId)
as Long
                         def expirationTs = maxInactiveInterval * 1000 + accessedTs

Modified: tomee/tomee/trunk/tomee/tomee-webaccess/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/tomee/tomee-webaccess/src/main/webapp/WEB-INF/web.xml?rev=1566034&r1=1566033&r2=1566034&view=diff
==============================================================================
--- tomee/tomee/trunk/tomee/tomee-webaccess/src/main/webapp/WEB-INF/web.xml (original)
+++ tomee/tomee/trunk/tomee/tomee-webaccess/src/main/webapp/WEB-INF/web.xml Sat Feb  8 15:51:44
2014
@@ -46,6 +46,12 @@
 
   <security-constraint>
     <web-resource-collection>
+      <web-resource-name>Authentication Rest</web-resource-name>
+      <url-pattern>/rest/authentication</url-pattern>
+    </web-resource-collection>
+  </security-constraint>
+  <security-constraint>
+    <web-resource-collection>
       <web-resource-name>Secure Content</web-resource-name>
       <url-pattern>/*</url-pattern>
     </web-resource-collection>

Modified: tomee/tomee/trunk/tomee/tomee-webaccess/src/main/webapp/app/app.less
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/tomee/tomee-webaccess/src/main/webapp/app/app.less?rev=1566034&r1=1566033&r2=1566034&view=diff
==============================================================================
--- tomee/tomee/trunk/tomee/tomee-webaccess/src/main/webapp/app/app.less (original)
+++ tomee/tomee/trunk/tomee/tomee-webaccess/src/main/webapp/app/app.less Sat Feb  8 15:51:44
2014
@@ -45,6 +45,18 @@ body {
     right: @offset;
     margin-bottom: 0;
     overflow: auto;
+
+    > div {
+      margin: 0;
+
+      > div.panel-body {
+        margin: 5px;
+      }
+    }
+
+    table {
+      margin: 0;
+    }
   }
 
   .ux-logfile-output {

Modified: tomee/tomee/trunk/tomee/tomee-webaccess/src/main/webapp/app/js/templates/sessions.handlebars
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/tomee/tomee-webaccess/src/main/webapp/app/js/templates/sessions.handlebars?rev=1566034&r1=1566033&r2=1566034&view=diff
==============================================================================
--- tomee/tomee/trunk/tomee/tomee-webaccess/src/main/webapp/app/js/templates/sessions.handlebars
(original)
+++ tomee/tomee/trunk/tomee/tomee-webaccess/src/main/webapp/app/js/templates/sessions.handlebars
Sat Feb  8 15:51:44 2014
@@ -1,27 +1,34 @@
-<table class="table table-striped">
-    <thead>
-    <tr>
-        <th>{{i18n "session.id"}}</th>
-        <th>{{i18n "session.context"}}</th>
-        <th>{{i18n "session.creation.date"}}</th>
-        <th>{{i18n "session.last.access"}}</th>
-        <th>{{i18n "session.expiration.date"}}</th>
-    </tr>
-    </thead>
-    <tbody>
-    {{#each sessions}}
-    <tr>
-        <td>{{this.sessionId}}</td>
-        <td>{{this.context}}</td>
-        <td>{{timeStampToDate this.creationTs}}</td>
-        <td>{{timeStampToDate this.lastAccessTs}}</td>
-        <td>{{timeStampToDate this.expirationTs}}
-            <a class="ux-expire-btn" href="expire">
+<div class="panel panel-default">
+    <div class="panel-heading">
+        <h3 class="panel-title">{{i18n "sessions"}}</h3>
+    </div>
+    <div class="panel-body">
+        <table class="table table-striped table-bordered">
+            <thead>
+            <tr>
+                <th>{{i18n "session.id"}}</th>
+                <th>{{i18n "session.context"}}</th>
+                <th>{{i18n "session.creation.date"}}</th>
+                <th>{{i18n "session.last.access"}}</th>
+                <th>{{i18n "session.expiration.date"}}</th>
+            </tr>
+            </thead>
+            <tbody>
+            {{#each sessions}}
+            <tr>
+                <td>{{this.sessionId}}</td>
+                <td>{{this.context}}</td>
+                <td>{{timeStampToDate this.creationTs}}</td>
+                <td>{{timeStampToDate this.lastAccessTs}}</td>
+                <td>{{timeStampToDate this.expirationTs}}
+                    <a class="ux-expire-btn" href="expire">
                 <span data-session-id="{{this.sessionId}}" data-context-id="{{this.context}}"
                       class="glyphicon glyphicon-trash"></span>
-            </a>
-        </td>
-    </tr>
-    {{/each}}
-    </tbody>
-</table>
+                    </a>
+                </td>
+            </tr>
+            {{/each}}
+            </tbody>
+        </table>
+    </div>
+</div>

Added: tomee/tomee/trunk/tomee/tomee-webaccess/src/test/groovy/org/apache/tomee/webaccess/test/helpers/Utilities.groovy
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/tomee/tomee-webaccess/src/test/groovy/org/apache/tomee/webaccess/test/helpers/Utilities.groovy?rev=1566034&view=auto
==============================================================================
--- tomee/tomee/trunk/tomee/tomee-webaccess/src/test/groovy/org/apache/tomee/webaccess/test/helpers/Utilities.groovy
(added)
+++ tomee/tomee/trunk/tomee/tomee-webaccess/src/test/groovy/org/apache/tomee/webaccess/test/helpers/Utilities.groovy
Sat Feb  8 15:51:44 2014
@@ -0,0 +1,70 @@
+/**
+ *
+ * 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.tomee.webaccess.test.helpers
+
+import org.apache.commons.io.FileUtils
+import org.apache.http.Consts
+import org.apache.http.NameValuePair
+import org.apache.http.client.entity.UrlEncodedFormEntity
+import org.apache.http.client.methods.CloseableHttpResponse
+import org.apache.http.client.methods.HttpPost
+import org.apache.http.impl.client.CloseableHttpClient
+import org.apache.http.impl.client.HttpClients
+import org.apache.http.message.BasicNameValuePair
+import org.apache.http.util.EntityUtils
+
+class Utilities {
+
+    static void copyFile(String from, String to) {
+        FileUtils.copyInputStreamToFile(
+                Thread.currentThread().contextClassLoader.getResourceAsStream(from),
+                new File("${System.getProperty("arquillian.tomee.path")}/${to}")
+        )
+    }
+
+    static String getBody(CloseableHttpResponse response) {
+        String body = null
+        try {
+            def entity = response.getEntity()
+            body = EntityUtils.toString(entity)
+            EntityUtils.consume(entity)
+        } finally {
+            response.close()
+        }
+        body
+    }
+
+    static String post(URL deploymentURL, CloseableHttpClient client, String path, NameValuePair...
postParams) {
+        def post = new HttpPost("${deploymentURL.toURI()}${path}")
+        post.entity = new UrlEncodedFormEntity(new ArrayList<NameValuePair>(Arrays.asList(postParams)),
Consts.UTF_8)
+        getBody(client.execute(post))
+    }
+
+    static def withClient(URL deploymentURL, callback) {
+        def client = HttpClients.custom().build()
+        post(deploymentURL, client, 'rest/authentication',
+                new BasicNameValuePair('user', 'admin'),
+                new BasicNameValuePair('password', 'admin')
+        )
+        callback(client)
+        client.close()
+    }
+
+
+}

Added: tomee/tomee/trunk/tomee/tomee-webaccess/src/test/groovy/org/apache/tomee/webaccess/test/units/LogTest.groovy
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/tomee/tomee-webaccess/src/test/groovy/org/apache/tomee/webaccess/test/units/LogTest.groovy?rev=1566034&view=auto
==============================================================================
--- tomee/tomee/trunk/tomee/tomee-webaccess/src/test/groovy/org/apache/tomee/webaccess/test/units/LogTest.groovy
(added)
+++ tomee/tomee/trunk/tomee/tomee-webaccess/src/test/groovy/org/apache/tomee/webaccess/test/units/LogTest.groovy
Sat Feb  8 15:51:44 2014
@@ -0,0 +1,69 @@
+/**
+ *
+ * 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.tomee.webaccess.test
+
+import org.apache.http.client.methods.HttpGet
+import org.apache.http.impl.client.CloseableHttpClient
+import org.apache.tomee.webaccess.rest.ApplicationConfig
+import org.apache.tomee.webaccess.rest.Authentication
+import org.apache.tomee.webaccess.rest.Log
+import org.apache.tomee.webaccess.service.LogServiceImpl
+import org.apache.tomee.webaccess.test.helpers.Utilities
+import org.jboss.arquillian.container.test.api.Deployment
+import org.jboss.arquillian.junit.Arquillian
+import org.jboss.arquillian.test.api.ArquillianResource
+import org.jboss.shrinkwrap.api.ShrinkWrap
+import org.jboss.shrinkwrap.api.spec.WebArchive
+import org.junit.Assert
+import org.junit.Test
+import org.junit.runner.RunWith
+
+@RunWith(Arquillian.class)
+class LogTest {
+
+    @ArquillianResource
+    URL deploymentURL
+
+    @Deployment
+    static WebArchive createDeployment() {
+        Utilities.copyFile('test/loginScript.js', 'conf/loginScript.js')
+        Utilities.copyFile('test/login.config', 'conf/login.config')
+        Utilities.copyFile('test/log/catalina.2014-02-07.log', 'logs/catalina.2014-02-07.log')
+        Utilities.copyFile('test/log/localhost_access_log.2014-02-07.txt', 'logs/localhost_access_log.2014-02-07.txt')
+        ShrinkWrap.create(WebArchive.class, 'webaccess.war').addClasses(
+                Log,
+                ApplicationConfig,
+                Authentication,
+                Log,
+                LogServiceImpl,
+                LogTest
+        ).addAsWebResource(new File('src/test/resources/test/context.xml'), 'META-INF/context.xml')
+    }
+
+    @Test
+    void test() throws Exception {
+        Utilities.withClient(deploymentURL, { CloseableHttpClient client ->
+            Assert.assertEquals('{"listFilesResultDto":{"files":["catalina.2014-02-07.log","localhost_access_log.2014-02-07.txt"]}}',
+                    Utilities.getBody(client.execute(new HttpGet("${deploymentURL.toURI()}rest/log/list-files")))
+            )
+            client.execute(new HttpGet("${deploymentURL.toURI()}rest/keep-alive"))
+        })
+    }
+
+}

Added: tomee/tomee/trunk/tomee/tomee-webaccess/src/test/groovy/org/apache/tomee/webaccess/test/units/SessionTest.groovy
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/tomee/tomee-webaccess/src/test/groovy/org/apache/tomee/webaccess/test/units/SessionTest.groovy?rev=1566034&view=auto
==============================================================================
--- tomee/tomee/trunk/tomee/tomee-webaccess/src/test/groovy/org/apache/tomee/webaccess/test/units/SessionTest.groovy
(added)
+++ tomee/tomee/trunk/tomee/tomee-webaccess/src/test/groovy/org/apache/tomee/webaccess/test/units/SessionTest.groovy
Sat Feb  8 15:51:44 2014
@@ -0,0 +1,68 @@
+/**
+ *
+ * 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.tomee.webaccess.test
+
+import org.apache.http.client.methods.HttpGet
+import org.apache.http.impl.client.CloseableHttpClient
+import org.apache.tomee.webaccess.rest.ApplicationConfig
+import org.apache.tomee.webaccess.rest.Authentication
+import org.apache.tomee.webaccess.rest.Session
+import org.apache.tomee.webaccess.service.SessionServiceImpl
+import org.apache.tomee.webaccess.test.helpers.Utilities
+import org.jboss.arquillian.container.test.api.Deployment
+import org.jboss.arquillian.junit.Arquillian
+import org.jboss.arquillian.test.api.ArquillianResource
+import org.jboss.shrinkwrap.api.ShrinkWrap
+import org.jboss.shrinkwrap.api.spec.WebArchive
+import org.junit.Assert
+import org.junit.Test
+import org.junit.runner.RunWith
+
+@RunWith(Arquillian.class)
+class SessionTest {
+
+    @ArquillianResource
+    URL deploymentURL
+
+    @Deployment
+    static WebArchive createDeployment() {
+        Utilities.copyFile('test/loginScript.js', 'conf/loginScript.js')
+        Utilities.copyFile('test/login.config', 'conf/login.config')
+        ShrinkWrap.create(WebArchive.class, 'webaccess.war').addClasses(
+                ApplicationConfig,
+                Authentication,
+                Session,
+                SessionServiceImpl,
+                SessionTest
+        ).addAsWebResource(new File('src/test/resources/test/context.xml'), 'META-INF/context.xml')
+    }
+
+    @Test
+    void test() throws Exception {
+        Utilities.withClient(deploymentURL, { CloseableHttpClient client ->
+            def content = Utilities.getBody(client.execute(new HttpGet("${deploymentURL.toURI()}rest/session")))
+            Assert.assertEquals(1, (content =~ /context/).count)
+        })
+        Utilities.withClient(deploymentURL, { CloseableHttpClient client ->
+            def content = Utilities.getBody(client.execute(new HttpGet("${deploymentURL.toURI()}rest/session")))
+            Assert.assertEquals(2, (content =~ /context/).count)
+        })
+    }
+
+}

Added: tomee/tomee/trunk/tomee/tomee-webaccess/src/test/resources/arquillian.xml
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/tomee/tomee-webaccess/src/test/resources/arquillian.xml?rev=1566034&view=auto
==============================================================================
--- tomee/tomee/trunk/tomee/tomee-webaccess/src/test/resources/arquillian.xml (added)
+++ tomee/tomee/trunk/tomee/tomee-webaccess/src/test/resources/arquillian.xml Sat Feb  8 15:51:44
2014
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+    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.
+-->
+<arquillian>
+  <container qualifier="tomee" default="true">
+    <configuration>
+      <property name="httpPort">-1</property>
+      <property name="stopPort">-1</property>
+      <property name="dir">target/arquillian-tomee</property>
+    </configuration>
+  </container>
+</arquillian>
\ No newline at end of file

Added: tomee/tomee/trunk/tomee/tomee-webaccess/src/test/resources/test/context.xml
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/tomee/tomee-webaccess/src/test/resources/test/context.xml?rev=1566034&view=auto
==============================================================================
--- tomee/tomee/trunk/tomee/tomee-webaccess/src/test/resources/test/context.xml (added)
+++ tomee/tomee/trunk/tomee/tomee-webaccess/src/test/resources/test/context.xml Sat Feb  8
15:51:44 2014
@@ -0,0 +1,24 @@
+<?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 antiJARLocking="true" path="/webaccess">
+  <Realm className="org.apache.catalina.realm.JAASRealm" appName="ScriptLogin"
+         userClassNames="org.apache.openejb.core.security.jaas.UserPrincipal"
+         roleClassNames="org.apache.openejb.core.security.jaas.GroupPrincipal">
+  </Realm>
+</Context>

Added: tomee/tomee/trunk/tomee/tomee-webaccess/src/test/resources/test/login.config
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/tomee/tomee-webaccess/src/test/resources/test/login.config?rev=1566034&view=auto
==============================================================================
--- tomee/tomee/trunk/tomee/tomee-webaccess/src/test/resources/test/login.config (added)
+++ tomee/tomee/trunk/tomee/tomee-webaccess/src/test/resources/test/login.config Sat Feb 
8 15:51:44 2014
@@ -0,0 +1,5 @@
+ScriptLogin {
+    org.apache.openejb.core.security.jaas.ScriptLoginModule required
+    	engineName="js"
+    	scriptURI="loginScript.js";
+};

Added: tomee/tomee/trunk/tomee/tomee-webaccess/src/test/resources/test/loginScript.js
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/tomee/tomee-webaccess/src/test/resources/test/loginScript.js?rev=1566034&view=auto
==============================================================================
--- tomee/tomee/trunk/tomee/tomee-webaccess/src/test/resources/test/loginScript.js (added)
+++ tomee/tomee/trunk/tomee/tomee-webaccess/src/test/resources/test/loginScript.js Sat Feb
 8 15:51:44 2014
@@ -0,0 +1,20 @@
+/*
+ * 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.
+ */
+
+var result = new java.util.ArrayList();
+result.add('tomee-admin');
+result;
\ No newline at end of file



Mime
View raw message