You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openmeetings.apache.org by so...@apache.org on 2012/03/05 14:56:25 UTC

svn commit: r1297060 - in /incubator/openmeetings/trunk/singlewebapp: ./ WebContent/WEB-INF/ WebContent/src/base/ WebContent/src/base/components/upload/ WebContent/src/plugins/fileexplorer/ WebContent/src/plugins/fileexplorer/upload/ lib/ src/app/org/o...

Author: solomax
Date: Mon Mar  5 13:56:25 2012
New Revision: 1297060

URL: http://svn.apache.org/viewvc?rev=1297060&view=rev
Log:
build.xml is fixed to place all files to the right places; multipartrequest.jar was removed in favor of Spring MVC Controllers

Added:
    incubator/openmeetings/trunk/singlewebapp/WebContent/WEB-INF/spring-mvc-servlet.xml
    incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/BackupImportController.java
      - copied, changed from r1296849, incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/BackupImport.java
    incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/ImportController.java
      - copied, changed from r1296849, incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/Import.java
    incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/UploadController.java
Removed:
    incubator/openmeetings/trunk/singlewebapp/lib/multipartrequest.jar
    incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/BackupImport.java
    incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/BackupImportFacade.java
    incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/FileExplorerUploadHandler.java
    incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/Import.java
    incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/UploadHandler.java
Modified:
    incubator/openmeetings/trunk/singlewebapp/.classpath
    incubator/openmeetings/trunk/singlewebapp/WebContent/WEB-INF/openmeetings-applicationContext.xml
    incubator/openmeetings/trunk/singlewebapp/WebContent/WEB-INF/web.xml
    incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/components/upload/backupImportWindow.lzx
    incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/components/upload/importWindow.lzx
    incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/components/upload/uploadWindow.lzx
    incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/mainMethods.lzx
    incubator/openmeetings/trunk/singlewebapp/WebContent/src/plugins/fileexplorer/fileExplorer.lzx
    incubator/openmeetings/trunk/singlewebapp/WebContent/src/plugins/fileexplorer/upload/uploadWindowExplorer.lzx
    incubator/openmeetings/trunk/singlewebapp/build.xml
    incubator/openmeetings/trunk/singlewebapp/ivy.xml

Modified: incubator/openmeetings/trunk/singlewebapp/.classpath
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/.classpath?rev=1297060&r1=1297059&r2=1297060&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/.classpath (original)
+++ incubator/openmeetings/trunk/singlewebapp/.classpath Mon Mar  5 13:56:25 2012
@@ -1,168 +1,148 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-	<classpathentry kind="src" path="src/app"/>
-	<classpathentry kind="src" path="src/fileservice"/>
-	<classpathentry kind="src" path="src/roomservice"/>
-	<classpathentry kind="src" path="src/templates"/>
-	<classpathentry kind="src" path="src/test"/>
-	<classpathentry kind="src" path="src/userservice"/>
-	<classpathentry kind="src" path="WebContent/WEB-INF"/>
-	<classpathentry excluding="*" including="META-INF/" kind="src" path="src"/>
-	<classpathentry kind="src" path="src/docgenerator"/>
-	<classpathentry kind="src" path="src/calendarservice"/>
-	<classpathentry kind="src" path="src/red5-screenshare"/>
-	<classpathentry exported="true" kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
-	<classpathentry exported="true" kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
-	<classpathentry exported="true" kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4">
-		<attributes>
-			<attribute name="org.eclipse.jst.component.nondependency" value=""/>
-		</attributes>
-	</classpathentry>
-	<classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-	<classpathentry kind="lib" path="lib/java_16_tools.jar"/>
-	<classpathentry kind="lib" path="lib/multipartrequest.jar"/>
-	<classpathentry kind="lib" path="lib/junit/junit-4.9.jar"/>
-	<classpathentry kind="lib" path="lib/junit/org.springframework.test-3.0.6.RELEASE.jar"/>
-	<classpathentry kind="lib" path="lib/om/activation-jar-1.1.jar"/>
-	<classpathentry kind="lib" path="lib/om/batik-anim-1.7.jar"/>
-	<classpathentry kind="lib" path="lib/om/batik-awt-util-1.7.jar"/>
-	<classpathentry kind="lib" path="lib/om/batik-bridge-1.7.jar"/>
-	<classpathentry kind="lib" path="lib/om/batik-codec-1.7.jar"/>
-	<classpathentry kind="lib" path="lib/om/batik-css-1.7.jar"/>
-	<classpathentry kind="lib" path="lib/om/batik-dom-1.7.jar"/>
-	<classpathentry kind="lib" path="lib/om/batik-ext-1.7.jar"/>
-	<classpathentry kind="lib" path="lib/om/batik-extension-1.7.jar"/>
-	<classpathentry kind="lib" path="lib/om/batik-gui-util-1.7.jar"/>
-	<classpathentry kind="lib" path="lib/om/batik-gvt-1.7.jar"/>
-	<classpathentry kind="lib" path="lib/om/batik-parser-1.7.jar"/>
-	<classpathentry kind="lib" path="lib/om/batik-rasterizer-1.7.jar"/>
-	<classpathentry kind="lib" path="lib/om/batik-script-1.7.jar"/>
-	<classpathentry kind="lib" path="lib/om/batik-slideshow-1.7.jar"/>
-	<classpathentry kind="lib" path="lib/om/batik-squiggle-1.7.jar"/>
-	<classpathentry kind="lib" path="lib/om/batik-svg-dom-1.7.jar"/>
-	<classpathentry kind="lib" path="lib/om/batik-svggen-1.7.jar"/>
-	<classpathentry kind="lib" path="lib/om/batik-svgpp-1.7.jar"/>
-	<classpathentry kind="lib" path="lib/om/batik-swing-1.7.jar"/>
-	<classpathentry kind="lib" path="lib/om/batik-transcoder-1.7.jar"/>
-	<classpathentry kind="lib" path="lib/om/batik-ttf2svg-1.7.jar"/>
-	<classpathentry kind="lib" path="lib/om/batik-util-1.7.jar"/>
-	<classpathentry kind="lib" path="lib/om/batik-xml-1.7.jar"/>
-	<classpathentry kind="lib" path="lib/om/commons-codec-jar-1.3.jar"/>
-	<classpathentry kind="lib" path="lib/om/commons-dbcp-1.4.jar"/>
-	<classpathentry kind="lib" path="lib/om/commons-digester-2.1.jar"/>
-	<classpathentry kind="lib" path="lib/om/commons-fileupload-jar-1.2.jar"/>
-	<classpathentry kind="lib" path="lib/om/commons-httpclient-jar-3.1.jar"/>
-	<classpathentry kind="lib" path="lib/om/commons-io-jar-1.4.jar"/>
-	<classpathentry kind="lib" path="lib/om/commons-lang-2.6.jar"/>
-	<classpathentry kind="lib" path="lib/om/commons-logging-jar-1.1.1.jar"/>
-	<classpathentry kind="lib" path="lib/om/commons-transaction-1.2.jar"/>
-	<classpathentry kind="lib" path="lib/om/derby-10.8.2.2.jar"/>
-	<classpathentry kind="lib" path="lib/om/derbyclient-10.8.2.2.jar"/>
-	<classpathentry kind="lib" path="lib/om/dom4j-1.6.1.jar"/>
-	<classpathentry kind="lib" path="lib/om/fop-1.0.jar"/>
-	<classpathentry kind="lib" path="lib/om/geronimo-activation_1.1_spec-jar-1.0.2.jar"/>
-	<classpathentry kind="lib" path="lib/om/geronimo-annotation_1.0_spec-jar-1.1.jar"/>
-	<classpathentry kind="lib" path="lib/om/geronimo-javamail_1.4_spec-bundle-1.6.jar"/>
-	<classpathentry kind="lib" path="lib/om/geronimo-jaxws_2.2_spec-bundle-1.0.jar"/>
-	<classpathentry kind="lib" path="lib/om/geronimo-jta_1.1_spec-jar-1.1.jar"/>
-	<classpathentry kind="lib" path="lib/om/geronimo-saaj_1.3_spec-jar-1.0.1.jar"/>
-	<classpathentry kind="lib" path="lib/om/geronimo-stax-api_1.0_spec-bundle-1.0.1.jar"/>
-	<classpathentry kind="lib" path="lib/om/geronimo-ws-metadata_2.0_spec-jar-1.1.2.jar"/>
-	<classpathentry kind="lib" path="lib/om/httpcore-jar-4.0.jar"/>
-	<classpathentry kind="lib" path="lib/om/ical4j-bundle-1.0.3.jar"/>
-	<classpathentry kind="lib" path="lib/om/jaxen-jar-1.1.1.jar"/>
-	<classpathentry kind="lib" path="lib/om/jsr311-api-jar-1.0.jar"/>
-	<classpathentry kind="lib" path="lib/om/mysql-connector-java-5.1.9.jar"/>
-	<classpathentry kind="lib" path="lib/om/openjpa-bundle-2.2.0.jar"/>
-	<classpathentry kind="lib" path="lib/om/postgresql-9.1-901.jdbc4.jar"/>
-	<classpathentry kind="lib" path="lib/om/serp-1.13.1.jar"/>
-	<classpathentry kind="lib" path="lib/om/stax-api-jar-1.0-2.jar"/>
-	<classpathentry kind="lib" path="lib/om/velocity-1.7.jar"/>
-	<classpathentry kind="lib" path="lib/om/velocity-tools-2.0.jar"/>
-	<classpathentry kind="lib" path="lib/om/ws-commons-util-1.0.2.jar"/>
-	<classpathentry kind="lib" path="lib/om/wsdl4j-jar-1.6.2.jar"/>
-	<classpathentry kind="lib" path="lib/om/wstx-asl-jar-3.2.9.jar"/>
-	<classpathentry kind="lib" path="lib/om/xalan-jar-2.7.0.jar"/>
-	<classpathentry kind="lib" path="lib/om/xml-apis-ext-1.3.04.jar"/>
-	<classpathentry kind="lib" path="lib/om/xml-resolver-jar-1.2.jar"/>
-	<classpathentry kind="lib" path="lib/om/xmlgraphics-commons-1.4.jar"/>
-	<classpathentry kind="lib" path="lib/om/xmlrpc-client-3.1.3.jar"/>
-	<classpathentry kind="lib" path="lib/om/xmlrpc-common-3.1.3.jar"/>
-	<classpathentry kind="lib" path="lib/om/xpp3-1.1.4c.jar"/>
-	<classpathentry kind="lib" path="lib/om/xstream-1.4.2.jar"/>
-	<classpathentry kind="lib" path="lib/om/servlet-api-jar-2.5.jar"/>
-	<classpathentry kind="lib" path="lib/dtd-generator/trang-20091111.jar"/>
-	<classpathentry kind="lib" path="lib/mainlibs/cglib-2.2.2.jar"/>
-	<classpathentry kind="lib" path="lib/mainlibs/com.springsource.org.aopalliance-1.0.0.jar"/>
-	<classpathentry kind="lib" path="lib/mainlibs/geronimo-jpa_2.0_spec-bundle-1.1.jar"/>
-	<classpathentry kind="lib" path="lib/mainlibs/org.springframework.aop-3.0.6.RELEASE.jar"/>
-	<classpathentry kind="lib" path="lib/mainlibs/org.springframework.aspects-3.0.6.RELEASE.jar"/>
-	<classpathentry kind="lib" path="lib/mainlibs/org.springframework.jdbc-3.0.6.RELEASE.jar"/>
-	<classpathentry kind="lib" path="lib/mainlibs/org.springframework.orm-3.0.6.RELEASE.jar"/>
-	<classpathentry kind="lib" path="lib/mainlibs/org.springframework.transaction-3.0.6.RELEASE.jar"/>
-	<classpathentry kind="lib" path="lib/mainlibs/org.springframework.web.servlet-3.0.6.RELEASE.jar"/>
-	<classpathentry kind="lib" path="red5/dist/red5.jar"/>
-	<classpathentry kind="lib" path="red5/dist/lib/bcprov-jdk16-145.jar"/>
-	<classpathentry kind="lib" path="red5/dist/lib/com.springsource.javax.xml.stream-1.0.1.jar"/>
-	<classpathentry kind="lib" path="red5/dist/lib/com.springsource.org.antlr-3.1.3.jar"/>
-	<classpathentry kind="lib" path="red5/dist/lib/com.springsource.org.apache.xerces-2.9.1.jar"/>
-	<classpathentry kind="lib" path="red5/dist/lib/com.springsource.org.codehaus.groovy-1.7.0.jar"/>
-	<classpathentry kind="lib" path="red5/dist/lib/com.springsource.org.mozilla.javascript-1.7.0.R2.jar"/>
-	<classpathentry kind="lib" path="red5/dist/lib/com.springsource.org.objectweb.asm-3.2.0.jar"/>
-	<classpathentry kind="lib" path="red5/dist/lib/com.springsource.org.objectweb.asm.commons-3.2.0.jar"/>
-	<classpathentry kind="lib" path="red5/dist/lib/com.springsource.slf4j.api-1.6.1.jar"/>
-	<classpathentry kind="lib" path="red5/dist/lib/com.springsource.slf4j.bridge-1.6.1.jar"/>
-	<classpathentry kind="lib" path="red5/dist/lib/commons-beanutils-1.8.3.jar"/>
-	<classpathentry kind="lib" path="red5/dist/lib/commons-codec-1.6.jar"/>
-	<classpathentry kind="lib" path="red5/dist/lib/commons-collections-3.2.1.jar"/>
-	<classpathentry kind="lib" path="red5/dist/lib/commons-lang3-3.1.jar"/>
-	<classpathentry kind="lib" path="red5/dist/lib/commons-modeler-2.0.1.jar"/>
-	<classpathentry kind="lib" path="red5/dist/lib/commons-pool-1.5.6.jar"/>
-	<classpathentry kind="lib" path="red5/dist/lib/ehcache-core-2.5.0.jar"/>
-	<classpathentry kind="lib" path="red5/dist/lib/httpclient-4.1.2.jar"/>
-	<classpathentry kind="lib" path="red5/dist/lib/httpcore-4.1.3.jar"/>
-	<classpathentry kind="lib" path="red5/dist/lib/jaudiotagger-2.0.4-SNAPSHOT.jar"/>
-	<classpathentry kind="lib" path="red5/dist/lib/javaee-api-5.1.2.om.jar"/>
-	<classpathentry kind="lib" path="red5/dist/lib/jcl-over-slf4j-1.6.1.jar"/>
-	<classpathentry kind="lib" path="red5/dist/lib/jruby-complete-1.1.6.jar"/>
-	<classpathentry kind="lib" path="red5/dist/lib/jul-to-slf4j-1.6.1.jar"/>
-	<classpathentry kind="lib" path="red5/dist/lib/jython-2.5.jar"/>
-	<classpathentry kind="lib" path="red5/dist/lib/log4j-over-slf4j-1.6.1.jar"/>
-	<classpathentry kind="lib" path="red5/dist/lib/logback-classic-0.9.28.jar"/>
-	<classpathentry kind="lib" path="red5/dist/lib/logback-core-0.9.28.jar"/>
-	<classpathentry kind="lib" path="red5/dist/lib/mina-core-2.0.4.jar"/>
-	<classpathentry kind="lib" path="red5/dist/lib/mina-integration-beans-2.0.4.jar"/>
-	<classpathentry kind="lib" path="red5/dist/lib/mina-integration-jmx-2.0.4.jar"/>
-	<classpathentry kind="lib" path="red5/dist/lib/quartz-1.8.5.jar"/>
-	<classpathentry kind="lib" path="red5/dist/lib/spring-asm-3.0.6.RELEASE.jar"/>
-	<classpathentry kind="lib" path="red5/dist/lib/spring-beans-3.0.6.RELEASE.jar"/>
-	<classpathentry kind="lib" path="red5/dist/lib/spring-context-3.0.6.RELEASE.jar"/>
-	<classpathentry kind="lib" path="red5/dist/lib/spring-context-support-3.0.6.RELEASE.jar"/>
-	<classpathentry kind="lib" path="red5/dist/lib/spring-core-3.0.6.RELEASE.jar"/>
-	<classpathentry kind="lib" path="red5/dist/lib/spring-expression-3.0.6.RELEASE.jar"/>
-	<classpathentry kind="lib" path="red5/dist/lib/spring-web-3.0.6.RELEASE.jar"/>
-	<classpathentry kind="lib" path="red5/dist/lib/xmlrpc-2.0.1.jar"/>
-	<classpathentry kind="lib" path="lib/om/apache-mime4j-core-jar-0.7.2.jar"/>
-	<classpathentry kind="lib" path="lib/om/axiom-api-bundle-1.2.13-SNAPSHOT.jar"/>
-	<classpathentry kind="lib" path="lib/om/axiom-dom-bundle-1.2.13-SNAPSHOT.jar"/>
-	<classpathentry kind="lib" path="lib/om/axiom-impl-bundle-1.2.13-SNAPSHOT.jar"/>
-	<classpathentry kind="lib" path="lib/om/axis2-1.7.0-SNAPSHOT.jar"/>
-	<classpathentry kind="lib" path="lib/om/axis2-jaxws-jar-1.7.0-SNAPSHOT.jar"/>
-	<classpathentry kind="lib" path="lib/om/axis2-kernel-jar-1.7.0-SNAPSHOT.jar"/>
-	<classpathentry kind="lib" path="lib/om/axis2-metadata-jar-1.7.0-SNAPSHOT.jar"/>
-	<classpathentry kind="lib" path="lib/om/axis2-saaj-jar-1.7.0-SNAPSHOT.jar"/>
-	<classpathentry kind="lib" path="lib/om/axis2-transport-http-bundle-1.7.0-SNAPSHOT.jar"/>
-	<classpathentry kind="lib" path="lib/om/axis2-transport-local-bundle-1.7.0-SNAPSHOT.jar"/>
-	<classpathentry kind="lib" path="lib/om/backport-util-concurrent-3.1.jar"/>
-	<classpathentry kind="lib" path="lib/om/jaxb-api-jar-2.2.4.jar"/>
-	<classpathentry kind="lib" path="lib/om/jaxb-impl-jar-2.2.4.jar"/>
-	<classpathentry kind="lib" path="lib/om/jaxb-xjc-jar-2.2.4.jar"/>
-	<classpathentry kind="lib" path="lib/om/jaxws-tools-jar-2.2.5.jar"/>
-	<classpathentry kind="lib" path="lib/om/mail-1.4.4.jar"/>
-	<classpathentry kind="lib" path="lib/om/neethi-bundle-3.0.2-SNAPSHOT.jar"/>
-	<classpathentry kind="lib" path="lib/om/woden-api-jar-1.0-SNAPSHOT.jar"/>
-	<classpathentry kind="lib" path="lib/om/woden-impl-commons-jar-1.0-SNAPSHOT.jar"/>
-	<classpathentry kind="lib" path="lib/om/woden-impl-dom-jar-1.0-SNAPSHOT.jar"/>
-	<classpathentry kind="lib" path="lib/om/XmlSchema-bundle-1.4.8-SNAPSHOT.jar"/>
-	<classpathentry kind="output" path="build/classes"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src/app"/>
+	<classpathentry kind="src" path="src/fileservice"/>
+	<classpathentry kind="src" path="src/roomservice"/>
+	<classpathentry kind="src" path="src/templates"/>
+	<classpathentry kind="src" path="src/test"/>
+	<classpathentry kind="src" path="src/userservice"/>
+	<classpathentry kind="src" path="WebContent/WEB-INF"/>
+	<classpathentry excluding="*" including="META-INF/" kind="src" path="src"/>
+	<classpathentry kind="src" path="src/docgenerator"/>
+	<classpathentry kind="src" path="src/calendarservice"/>
+	<classpathentry kind="src" path="src/red5-screenshare"/>
+	<classpathentry exported="true" kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
+	<classpathentry exported="true" kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
+	<classpathentry exported="true" kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4">
+		<attributes>
+			<attribute name="org.eclipse.jst.component.nondependency" value=""/>
+		</attributes>
+	</classpathentry>
+	<classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="lib" path="lib/java_16_tools.jar"/>
+	<classpathentry kind="lib" path="lib/om/activation-jar-1.1.jar"/>
+	<classpathentry kind="lib" path="lib/om/commons-codec-jar-1.3.jar"/>
+	<classpathentry kind="lib" path="lib/om/commons-httpclient-jar-3.1.jar"/>
+	<classpathentry kind="lib" path="lib/om/geronimo-activation_1.1_spec-jar-1.0.2.jar"/>
+	<classpathentry kind="lib" path="lib/om/geronimo-annotation_1.0_spec-jar-1.1.jar"/>
+	<classpathentry kind="lib" path="lib/om/geronimo-javamail_1.4_spec-bundle-1.6.jar"/>
+	<classpathentry kind="lib" path="lib/om/geronimo-jaxws_2.2_spec-bundle-1.0.jar"/>
+	<classpathentry kind="lib" path="lib/om/geronimo-jta_1.1_spec-jar-1.1.jar"/>
+	<classpathentry kind="lib" path="lib/om/geronimo-saaj_1.3_spec-jar-1.0.1.jar"/>
+	<classpathentry kind="lib" path="lib/om/geronimo-stax-api_1.0_spec-bundle-1.0.1.jar"/>
+	<classpathentry kind="lib" path="lib/om/geronimo-ws-metadata_2.0_spec-jar-1.1.2.jar"/>
+	<classpathentry kind="lib" path="lib/om/httpcore-jar-4.0.jar"/>
+	<classpathentry kind="lib" path="lib/om/ical4j-bundle-1.0.3.jar"/>
+	<classpathentry kind="lib" path="lib/om/jaxen-jar-1.1.1.jar"/>
+	<classpathentry kind="lib" path="lib/om/jsr311-api-jar-1.0.jar"/>
+	<classpathentry kind="lib" path="lib/om/openjpa-bundle-2.2.0.jar"/>
+	<classpathentry kind="lib" path="lib/om/stax-api-jar-1.0-2.jar"/>
+	<classpathentry kind="lib" path="lib/om/wsdl4j-jar-1.6.2.jar"/>
+	<classpathentry kind="lib" path="lib/om/wstx-asl-jar-3.2.9.jar"/>
+	<classpathentry kind="lib" path="lib/om/xalan-jar-2.7.0.jar"/>
+	<classpathentry kind="lib" path="lib/om/xml-resolver-jar-1.2.jar"/>
+	<classpathentry kind="lib" path="lib/om/servlet-api-jar-2.5.jar"/>
+	<classpathentry kind="lib" path="lib/mainlibs/geronimo-jpa_2.0_spec-bundle-1.1.jar"/>
+	<classpathentry kind="lib" path="red5/dist/red5.jar"/>
+	<classpathentry kind="lib" path="red5/dist/lib/bcprov-jdk16-145.jar"/>
+	<classpathentry kind="lib" path="red5/dist/lib/com.springsource.javax.xml.stream-1.0.1.jar"/>
+	<classpathentry kind="lib" path="red5/dist/lib/com.springsource.org.antlr-3.1.3.jar"/>
+	<classpathentry kind="lib" path="red5/dist/lib/com.springsource.org.apache.xerces-2.9.1.jar"/>
+	<classpathentry kind="lib" path="red5/dist/lib/com.springsource.org.codehaus.groovy-1.7.0.jar"/>
+	<classpathentry kind="lib" path="red5/dist/lib/com.springsource.org.mozilla.javascript-1.7.0.R2.jar"/>
+	<classpathentry kind="lib" path="red5/dist/lib/com.springsource.org.objectweb.asm-3.2.0.jar"/>
+	<classpathentry kind="lib" path="red5/dist/lib/com.springsource.org.objectweb.asm.commons-3.2.0.jar"/>
+	<classpathentry kind="lib" path="red5/dist/lib/com.springsource.slf4j.api-1.6.1.jar"/>
+	<classpathentry kind="lib" path="red5/dist/lib/com.springsource.slf4j.bridge-1.6.1.jar"/>
+	<classpathentry kind="lib" path="red5/dist/lib/commons-beanutils-1.8.3.jar"/>
+	<classpathentry kind="lib" path="red5/dist/lib/commons-codec-1.6.jar"/>
+	<classpathentry kind="lib" path="red5/dist/lib/commons-collections-3.2.1.jar"/>
+	<classpathentry kind="lib" path="red5/dist/lib/commons-lang3-3.1.jar"/>
+	<classpathentry kind="lib" path="red5/dist/lib/commons-modeler-2.0.1.jar"/>
+	<classpathentry kind="lib" path="red5/dist/lib/commons-pool-1.5.6.jar"/>
+	<classpathentry kind="lib" path="red5/dist/lib/ehcache-core-2.5.0.jar"/>
+	<classpathentry kind="lib" path="red5/dist/lib/httpclient-4.1.2.jar"/>
+	<classpathentry kind="lib" path="red5/dist/lib/httpcore-4.1.3.jar"/>
+	<classpathentry kind="lib" path="red5/dist/lib/jaudiotagger-2.0.4-SNAPSHOT.jar"/>
+	<classpathentry kind="lib" path="red5/dist/lib/javaee-api-5.1.2.om.jar"/>
+	<classpathentry kind="lib" path="red5/dist/lib/jcl-over-slf4j-1.6.1.jar"/>
+	<classpathentry kind="lib" path="red5/dist/lib/jruby-complete-1.1.6.jar"/>
+	<classpathentry kind="lib" path="red5/dist/lib/jul-to-slf4j-1.6.1.jar"/>
+	<classpathentry kind="lib" path="red5/dist/lib/jython-2.5.jar"/>
+	<classpathentry kind="lib" path="red5/dist/lib/log4j-over-slf4j-1.6.1.jar"/>
+	<classpathentry kind="lib" path="red5/dist/lib/logback-classic-0.9.28.jar"/>
+	<classpathentry kind="lib" path="red5/dist/lib/logback-core-0.9.28.jar"/>
+	<classpathentry kind="lib" path="red5/dist/lib/mina-core-2.0.4.jar"/>
+	<classpathentry kind="lib" path="red5/dist/lib/mina-integration-beans-2.0.4.jar"/>
+	<classpathentry kind="lib" path="red5/dist/lib/mina-integration-jmx-2.0.4.jar"/>
+	<classpathentry kind="lib" path="red5/dist/lib/quartz-1.8.5.jar"/>
+	<classpathentry kind="lib" path="red5/dist/lib/spring-asm-3.0.6.RELEASE.jar"/>
+	<classpathentry kind="lib" path="red5/dist/lib/spring-beans-3.0.6.RELEASE.jar"/>
+	<classpathentry kind="lib" path="red5/dist/lib/spring-context-3.0.6.RELEASE.jar"/>
+	<classpathentry kind="lib" path="red5/dist/lib/spring-context-support-3.0.6.RELEASE.jar"/>
+	<classpathentry kind="lib" path="red5/dist/lib/spring-core-3.0.6.RELEASE.jar"/>
+	<classpathentry kind="lib" path="red5/dist/lib/spring-expression-3.0.6.RELEASE.jar"/>
+	<classpathentry kind="lib" path="red5/dist/lib/spring-web-3.0.6.RELEASE.jar"/>
+	<classpathentry kind="lib" path="red5/dist/lib/xmlrpc-2.0.1.jar"/>
+	<classpathentry kind="lib" path="lib/om/batik-anim-jar-1.7.jar"/>
+	<classpathentry kind="lib" path="lib/om/batik-awt-util-jar-1.7.jar"/>
+	<classpathentry kind="lib" path="lib/om/batik-bridge-jar-1.7.jar"/>
+	<classpathentry kind="lib" path="lib/om/batik-codec-jar-1.7.jar"/>
+	<classpathentry kind="lib" path="lib/om/batik-css-jar-1.7.jar"/>
+	<classpathentry kind="lib" path="lib/om/batik-dom-jar-1.7.jar"/>
+	<classpathentry kind="lib" path="lib/om/batik-ext-jar-1.7.jar"/>
+	<classpathentry kind="lib" path="lib/om/batik-extension-jar-1.7.jar"/>
+	<classpathentry kind="lib" path="lib/om/batik-gui-util-jar-1.7.jar"/>
+	<classpathentry kind="lib" path="lib/om/batik-gvt-jar-1.7.jar"/>
+	<classpathentry kind="lib" path="lib/om/batik-parser-jar-1.7.jar"/>
+	<classpathentry kind="lib" path="lib/om/batik-rasterizer-jar-1.7.jar"/>
+	<classpathentry kind="lib" path="lib/om/batik-script-jar-1.7.jar"/>
+	<classpathentry kind="lib" path="lib/om/batik-slideshow-jar-1.7.jar"/>
+	<classpathentry kind="lib" path="lib/om/batik-squiggle-jar-1.7.jar"/>
+	<classpathentry kind="lib" path="lib/om/batik-svg-dom-jar-1.7.jar"/>
+	<classpathentry kind="lib" path="lib/om/batik-svggen-jar-1.7.jar"/>
+	<classpathentry kind="lib" path="lib/om/batik-svgpp-jar-1.7.jar"/>
+	<classpathentry kind="lib" path="lib/om/batik-swing-jar-1.7.jar"/>
+	<classpathentry kind="lib" path="lib/om/batik-transcoder-jar-1.7.jar"/>
+	<classpathentry kind="lib" path="lib/om/batik-ttf2svg-jar-1.7.jar"/>
+	<classpathentry kind="lib" path="lib/om/batik-util-jar-1.7.jar"/>
+	<classpathentry kind="lib" path="lib/om/batik-xml-jar-1.7.jar"/>
+	<classpathentry kind="lib" path="lib/om/cglib-jar-2.2.2.jar"/>
+	<classpathentry kind="lib" path="lib/om/com.springsource.org.aopalliance-jar-1.0.0.jar"/>
+	<classpathentry kind="lib" path="lib/om/commons-dbcp-jar-1.4.jar"/>
+	<classpathentry kind="lib" path="lib/om/commons-digester-jar-2.1.jar"/>
+	<classpathentry kind="lib" path="lib/om/commons-fileupload-jar-1.2.2.jar"/>
+	<classpathentry kind="lib" path="lib/om/commons-io-jar-2.1.jar"/>
+	<classpathentry kind="lib" path="lib/om/commons-lang-jar-2.6.jar"/>
+	<classpathentry kind="lib" path="lib/om/commons-transaction-jar-1.2.jar"/>
+	<classpathentry kind="lib" path="lib/om/derby-jar-10.8.2.2.jar"/>
+	<classpathentry kind="lib" path="lib/om/derbyclient-jar-10.8.2.2.jar"/>
+	<classpathentry kind="lib" path="lib/om/dom4j-jar-1.6.1.jar"/>
+	<classpathentry kind="lib" path="lib/om/fop-jar-1.0.jar"/>
+	<classpathentry kind="lib" path="lib/om/geronimo-jpa_2.0_spec-bundle-1.1.jar"/>
+	<classpathentry kind="lib" path="lib/om/mail-jar-1.4.4.jar"/>
+	<classpathentry kind="lib" path="lib/om/mysql-connector-java-jar-5.1.9.jar"/>
+	<classpathentry kind="lib" path="lib/om/org.springframework.aop-jar-3.0.6.RELEASE.jar"/>
+	<classpathentry kind="lib" path="lib/om/org.springframework.aspects-jar-3.0.6.RELEASE.jar"/>
+	<classpathentry kind="lib" path="lib/om/org.springframework.jdbc-jar-3.0.6.RELEASE.jar"/>
+	<classpathentry kind="lib" path="lib/om/org.springframework.orm-jar-3.0.6.RELEASE.jar"/>
+	<classpathentry kind="lib" path="lib/om/org.springframework.transaction-jar-3.0.6.RELEASE.jar"/>
+	<classpathentry kind="lib" path="lib/om/org.springframework.web.servlet-jar-3.0.6.RELEASE.jar"/>
+	<classpathentry kind="lib" path="lib/om/postgresql-jar-9.1-901.jdbc4.jar"/>
+	<classpathentry kind="lib" path="lib/om/serp-jar-1.13.1.jar"/>
+	<classpathentry kind="lib" path="lib/om/velocity-jar-1.7.jar"/>
+	<classpathentry kind="lib" path="lib/om/velocity-tools-jar-2.0.jar"/>
+	<classpathentry kind="lib" path="lib/om/ws-commons-util-jar-1.0.2.jar"/>
+	<classpathentry kind="lib" path="lib/om/xml-apis-ext-jar-1.3.04.jar"/>
+	<classpathentry kind="lib" path="lib/om/xmlgraphics-commons-jar-1.4.jar"/>
+	<classpathentry kind="lib" path="lib/om/xmlrpc-client-jar-3.1.3.jar"/>
+	<classpathentry kind="lib" path="lib/om/xmlrpc-common-jar-3.1.3.jar"/>
+	<classpathentry kind="lib" path="lib/om/xpp3-jar-1.1.4c.jar"/>
+	<classpathentry kind="lib" path="lib/om/xstream-jar-1.4.2.jar"/>
+	<classpathentry kind="lib" path="lib/junit/junit-jar-4.9.jar"/>
+	<classpathentry kind="lib" path="lib/junit/org.springframework.test-jar-3.0.6.RELEASE.jar"/>
+	<classpathentry kind="lib" path="lib/dtd-generator/trang-jar-20091111.jar"/>
+	<classpathentry kind="lib" path="lib/om/axis2-kernel-jar-1.7.0-SNAPSHOT.jar"/>
+	<classpathentry kind="lib" path="lib/om/axiom-api-bundle-1.2.13-SNAPSHOT.jar"/>
+	<classpathentry kind="output" path="build/classes"/>
+</classpath>

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/WEB-INF/openmeetings-applicationContext.xml
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/WEB-INF/openmeetings-applicationContext.xml?rev=1297060&r1=1297059&r2=1297060&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/WEB-INF/openmeetings-applicationContext.xml (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/WEB-INF/openmeetings-applicationContext.xml Mon Mar  5 13:56:25 2012
@@ -21,10 +21,12 @@
 <beans	xmlns="http://www.springframework.org/schema/beans"
 		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 		xmlns:tx="http://www.springframework.org/schema/tx"
+		xmlns:mvc="http://www.springframework.org/schema/mvc"
 		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.xsd
-		http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd" 
+		http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
+		http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd" 
 >
 	<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean">
 		<property name="persistenceUnitName" value="openmeetings" />
@@ -38,11 +40,15 @@
 	<bean id="jpaTransactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
 		<property name="entityManagerFactory" ref="entityManagerFactory" />
 	</bean>
+	<bean id="multipartResolver"
+		class="org.springframework.web.multipart.commons.CommonsMultipartResolver"/>
+	<!-- Configures the @Controller programming model -->
+    <mvc:annotation-driven />
 	
 	<tx:annotation-driven transaction-manager="jpaTransactionManager" />
     <context:annotation-config />
     <context:component-scan base-package="org.openmeetings"/>
-	
+
     <!-- New Class for the Streaming Handlers -->
     <bean id="web.handler" class="org.openmeetings.app.remote.red5.ScopeApplicationAdapter"/>
     <bean id="openmeetings.ClientListManager" class="org.openmeetings.app.remote.red5.ClientListManager" />
@@ -165,6 +171,5 @@
   	
   	<!-- Servlet Facade Beans -->
   	<bean id="backupExport" class="org.openmeetings.servlet.outputhandler.BackupExport" />
-  	<bean id="backupImport" class="org.openmeetings.servlet.outputhandler.BackupImport" />
 
 </beans>

Added: incubator/openmeetings/trunk/singlewebapp/WebContent/WEB-INF/spring-mvc-servlet.xml
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/WEB-INF/spring-mvc-servlet.xml?rev=1297060&view=auto
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/WEB-INF/spring-mvc-servlet.xml (added)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/WEB-INF/spring-mvc-servlet.xml Mon Mar  5 13:56:25 2012
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?> 
+<beans	xmlns="http://www.springframework.org/schema/beans"
+		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+		xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd" 
+/>
+

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/WEB-INF/web.xml?rev=1297060&r1=1297059&r2=1297060&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/WEB-INF/web.xml (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/WEB-INF/web.xml Mon Mar  5 13:56:25 2012
@@ -80,6 +80,10 @@
     </context-param>
     
     <!-- remove the following servlet tags if you want to disable remoting for this application -->
+	<servlet>
+		<servlet-name>spring-mvc</servlet-name>
+		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
+	</servlet>
     <servlet>
         <servlet-name>gateway</servlet-name>
         <servlet-class>org.red5.server.net.servlet.AMFGatewayServlet</servlet-class>
@@ -93,10 +97,6 @@
         <servlet-class>org.openmeetings.servlet.outputhandler.Install</servlet-class>
     </servlet>
     <servlet>
-        <servlet-name>FileExplorerUploadHandler</servlet-name>
-        <servlet-class>org.openmeetings.servlet.outputhandler.FileExplorerUploadHandler</servlet-class>
-    </servlet>
-    <servlet>
         <servlet-name>ScreenRequestHandler</servlet-name>
         <servlet-class>org.openmeetings.servlet.outputhandler.ScreenRequestHandler</servlet-class>
     </servlet>
@@ -109,10 +109,6 @@
         <servlet-class>org.openmeetings.servlet.outputhandler.Export</servlet-class>
     </servlet>
     <servlet>
-        <servlet-name>Import</servlet-name>
-        <servlet-class>org.openmeetings.servlet.outputhandler.Import</servlet-class>
-    </servlet>
-    <servlet>
         <servlet-name>ExportToImage</servlet-name>
         <servlet-class>org.openmeetings.servlet.outputhandler.ExportToImage</servlet-class>
     </servlet>
@@ -150,12 +146,11 @@
         <servlet-name>BackupExport</servlet-name>
         <servlet-class>org.openmeetings.servlet.outputhandler.BackupExportFacade</servlet-class>
     </servlet> 
-    <servlet>
-		<description>BackupImport</description>
-      	<display-name>BackupImport</display-name>
-	    <servlet-name>BackupImport</servlet-name>
-	    <servlet-class>org.openmeetings.servlet.outputhandler.BackupImportFacade</servlet-class>
-	</servlet>
+	
+	<servlet-mapping>
+		<servlet-name>spring-mvc</servlet-name>
+		<url-pattern>*.upload</url-pattern>
+	</servlet-mapping>
     <servlet-mapping>
         <servlet-name>DownloadHandler</servlet-name>
         <url-pattern>/DownloadHandler</url-pattern>
@@ -169,10 +164,6 @@
         <url-pattern>/install</url-pattern>
     </servlet-mapping>
     <servlet-mapping>
-        <servlet-name>FileExplorerUploadHandler</servlet-name>
-        <url-pattern>/FileExplorerUploadHandler</url-pattern>
-    </servlet-mapping>
-    <servlet-mapping>
         <servlet-name>ScreenRequestHandler</servlet-name>
         <url-pattern>/ScreenRequestHandler</url-pattern>
     </servlet-mapping>
@@ -185,10 +176,6 @@
         <url-pattern>/Export</url-pattern>
     </servlet-mapping>
     <servlet-mapping>
-        <servlet-name>Import</servlet-name>
-        <url-pattern>/Import</url-pattern>
-    </servlet-mapping>
-    <servlet-mapping>
         <servlet-name>ExportToImage</servlet-name>
         <url-pattern>/ExportToImage</url-pattern>
     </servlet-mapping>
@@ -229,10 +216,6 @@
         <servlet-name>BackupExport</servlet-name>
         <url-pattern>/BackupExport</url-pattern>
     </servlet-mapping>
-    <servlet-mapping>
-	    <servlet-name>BackupImport</servlet-name>
-	    <url-pattern>/BackupImport</url-pattern>
-    </servlet-mapping>
     <mime-mapping>
         <extension>inc</extension>
         <mime-type>text/plain</mime-type>

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/components/upload/backupImportWindow.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/components/upload/backupImportWindow.lzx?rev=1297060&r1=1297059&r2=1297060&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/components/upload/backupImportWindow.lzx (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/components/upload/backupImportWindow.lzx Mon Mar  5 13:56:25 2012
@@ -87,7 +87,7 @@
 		<handler name="onclick">
 			<![CDATA[
 			var uploadurl = canvas.protocol+'://'+canvas.rtmphostlocal+':'+canvas.red5httpport
-				+canvas.httpRootKey+'BackupImport?sid='+canvas.sessionId
+				+canvas.httpRootKey+'backup.upload?sid='+canvas.sessionId
 				+'&publicSID='+canvas.publicSID;
             if ($debug) Debug.write("uploadurl: ",uploadurl);
 			parent.myFileUpload.upload(uploadurl);

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/components/upload/importWindow.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/components/upload/importWindow.lzx?rev=1297060&r1=1297059&r2=1297060&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/components/upload/importWindow.lzx (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/components/upload/importWindow.lzx Mon Mar  5 13:56:25 2012
@@ -87,7 +87,7 @@
 		<handler name="onclick">
 			<![CDATA[
 			var uploadurl = canvas.protocol+'://'+canvas.rtmphostlocal+':'+canvas.red5httpport
-				+canvas.httpRootKey+'Import?moduleName='+this.parent.uploadmodule
+				+canvas.httpRootKey+'import.upload?moduleName='+this.parent.uploadmodule
 				+'&secondid='+parent.secondid
 				+'&publicSID='+canvas.publicSID
 				+'&sid='+canvas.sessionId;

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/components/upload/uploadWindow.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/components/upload/uploadWindow.lzx?rev=1297060&r1=1297059&r2=1297060&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/components/upload/uploadWindow.lzx (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/components/upload/uploadWindow.lzx Mon Mar  5 13:56:25 2012
@@ -37,7 +37,7 @@
 	<attribute name="usersid" value="" type="string" />
 	<attribute name="singleslidesmodule_id" type="string" value="" />
 	
-	<attribute name="servletName" value="UploadHandler" type="string" />
+	<attribute name="servletName" value="upload.upload" type="string" />
 	<attribute name="parentFolderId" value="0" type="number" />
     
     <attribute name="uploadmodule" value="videoconf1" type="string" />

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/mainMethods.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/mainMethods.lzx?rev=1297060&r1=1297059&r2=1297060&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/mainMethods.lzx (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/mainMethods.lzx Mon Mar  5 13:56:25 2012
@@ -384,7 +384,7 @@
                             isOwner:false,
                             fileExplorerRef:null,
                             isOnlyImage:true,
-                            servletName:'FileExplorerUploadHandler'
+                            servletName:'file.upload'
                         });
                     
                 } else if (stringSub=='applyForMod') {

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/src/plugins/fileexplorer/fileExplorer.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/plugins/fileexplorer/fileExplorer.lzx?rev=1297060&r1=1297059&r2=1297060&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/src/plugins/fileexplorer/fileExplorer.lzx (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/src/plugins/fileexplorer/fileExplorer.lzx Mon Mar  5 13:56:25 2012
@@ -99,7 +99,7 @@
                             isOwner:isOwner,
                             fileExplorerRef:this,
                             isOnlyImage:true,
-                            servletName:'FileExplorerUploadHandler'
+                            servletName:'file.upload'
                         });
     </method>
     

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/src/plugins/fileexplorer/upload/uploadWindowExplorer.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/plugins/fileexplorer/upload/uploadWindowExplorer.lzx?rev=1297060&r1=1297059&r2=1297060&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/src/plugins/fileexplorer/upload/uploadWindowExplorer.lzx (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/src/plugins/fileexplorer/upload/uploadWindowExplorer.lzx Mon Mar  5 13:56:25 2012
@@ -39,7 +39,7 @@
 	<attribute name="singleslidesmodule_id" type="string" value="" />
 	<attribute name="fileExplorerRef" value="null" />
 	
-	<attribute name="servletName" value="UploadHandler" type="string" />
+	<attribute name="servletName" value="upload.upload" type="string" />
 	<attribute name="parentFolderId" value="0" type="number" />
     
     <attribute name="uploadmodule" value="videoconf1" type="string" />

Modified: incubator/openmeetings/trunk/singlewebapp/build.xml
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/build.xml?rev=1297060&r1=1297059&r2=1297060&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/build.xml (original)
+++ incubator/openmeetings/trunk/singlewebapp/build.xml Mon Mar  5 13:56:25 2012
@@ -436,7 +436,7 @@
 		</java>
 	</target>
 
-	<target name="compile" depends="prepare, compile.only" />
+	<target name="compile" depends="compile.only, prepare" />
 
 	<target name="compile.only" depends="-retrieve-mainlibs,-retrieve-om,-retrieve-dtd-generator,-retrieve-junit,compile.screen.share">
 		<echo message="Compile main to ${main.out.dir}"/>
@@ -780,11 +780,6 @@
 				<isset property="ivy.lib.location"/>
 			</not>
 		</condition>
-		<condition property="ivy.lib.pattern" value="[artifact]-[revision].[ext]">
-			<not>
-				<isset property="ivy.lib.pattern"/>
-			</not>
-		</condition>
 		<condition property="ivy.transitive" value="false">
 			<not>
 				<isset property="ivy.transitive"/>
@@ -792,7 +787,7 @@
 		</condition>
 		<echo message="Ivy conf name: ${ivy.conf.name}, destination: ${ivy.lib.location}"/>
 		<ivy:resolve file="ivy.xml" conf="${ivy.conf.name}" checkIfChanged="false" transitive="${ivy.transitive}" />
-		<ivy:retrieve conf="${ivy.conf.name}" pattern="${ivy.lib.location}/${ivy.lib.pattern}" />
+		<ivy:retrieve conf="${ivy.conf.name}" pattern="${ivy.lib.location}/[artifact]-[type]-[revision].[ext]" />
 	</target>
 	
 	<!-- Check for the Red5 libraries -->
@@ -811,8 +806,8 @@
 		<delete dir="${red5.lib}/webapps/installer"/>
 		<delete dir="${red5.lib}/webapps/live"/>
 		<delete dir="${red5.lib}/webapps/vod"/>
-		<copy file="${webcontent.src.dir}/red5/jee-container.xml" todir="${red5.lib}/conf" />
-		<copy file="${webcontent.src.dir}/red5/index.html" todir="${red5.lib}/webapps/root" />
+		<copy file="${webcontent.src.dir}/red5/jee-container.xml" todir="${red5.lib}/conf" overwrite="true" force="true"/>
+		<copy file="${webcontent.src.dir}/red5/index.html" todir="${red5.lib}/webapps/root" overwrite="true" force="true"/>
 	</target>
 	<!-- Check for the Top level libraries -->
 	<target name="-retrieve-mainlibs" unless="mainlib.installed" description="Retrieves the libraries if needed" depends="-retrieve-red5">
@@ -824,7 +819,6 @@
 		<antcall target="-retrieve" inheritAll="true" inheritRefs="true">
 			<param name="ivy.conf.name" value="mainlib.ext"/>
 			<param name="ivy.lib.location" value="${mainlibs.lib.dir}"/>
-			<param name="ivy.lib.pattern" value="[artifact]-[type]-[revision].[ext]"/>
 		</antcall>
 		<delete>
 			<fileset dir="${mainlibs.lib.dir}" includes="*-source*.jar"/>
@@ -840,15 +834,14 @@
 		<antcall target="-retrieve" inheritAll="true" inheritRefs="true">
 			<param name="ivy.conf.name" value="openmeetings.ext"/>
 			<param name="ivy.lib.location" value="${om.lib.dir}"/>
-			<param name="ivy.lib.pattern" value="[artifact]-[type]-[revision].[ext]"/>
 		</antcall>
 		<antcall target="-retrieve" inheritAll="true" inheritRefs="true">
 			<param name="ivy.conf.name" value="openmeetings.axis2"/>
 			<param name="ivy.lib.location" value="${om.lib.dir}"/>
-			<param name="ivy.lib.pattern" value="[artifact]-[type]-[revision].[ext]"/>
 			<param name="ivy.transitive" value="true" />
 		</antcall>
 		<delete>
+			<fileset dir="${om.lib.dir}" includes="commons-logging*.jar"/>
 			<fileset dir="${om.lib.dir}" includes="*-source*.jar"/>
 			<fileset dir="${om.lib.dir}" includes="*-javadoc*.jar"/>
 		</delete>

Modified: incubator/openmeetings/trunk/singlewebapp/ivy.xml
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/ivy.xml?rev=1297060&r1=1297059&r2=1297060&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/ivy.xml (original)
+++ incubator/openmeetings/trunk/singlewebapp/ivy.xml Mon Mar  5 13:56:25 2012
@@ -19,11 +19,11 @@
 	<configurations defaultconfmapping="default">
 		<conf name="default" />
 		<conf name="mainlib" extends="default" description="Top level libraries" />
-		<conf name="mainlib.ext" description="Top level libraries with different pattern" />
-		<conf name="openmeetings" description="Openmeetings required libraries" />
+		<conf name="mainlib.ext" extends="mainlib" description="Top level libraries with different pattern" />
+		<conf name="openmeetings" extends="mainlib.ext" description="Openmeetings required libraries" />
+		<conf name="openmeetings.ext" extends="openmeetings" description="Openmeetings required libraries with different pattern" />
+		<conf name="openmeetings.axis2" extends="openmeetings.ext" description="Axis required libraries with dependencies" />
 		<conf name="anakia" description="Openmeetings required libraries" />
-		<conf name="openmeetings.ext" description="Openmeetings required libraries with different pattern" />
-		<conf name="openmeetings.axis2" description="Axis required libraries with dependencies" />
 		<conf name="junit" description="Unit testing dependencies" />
 		<conf name="rat" description="Apache Rat dependencies" />
 		<conf name="dtd" description="Dtd-generator dependencies" />
@@ -32,6 +32,12 @@
 	</configurations>
 	<dependencies>
 		<!--  START OF mainlib -->
+		<dependency org="commons-fileupload" name="commons-fileupload" rev="1.2.2" transitive="false">
+			<include type="jar" />
+		</dependency>
+		<dependency org="commons-io" name="commons-io" rev="2.1" transitive="false">
+			<include type="jar" />
+		</dependency>
 		<dependency org="org.springframework" name="org.springframework.aop" rev="3.0.6.RELEASE" transitive="false">
 			<include type="jar" />
 		</dependency>
@@ -185,11 +191,6 @@
 		<dependency org="com.thoughtworks.xstream" name="xstream" rev="1.4.2" conf="openmeetings->*" transitive="false">
 			<include type="jar" />
 		</dependency>
-		
-		<!--  FIXME seems to be out of date
-		<dependency org="opensymphony" name="pell-multipart" rev="2.1.5" conf="openmeetings->*" transitive="false">
-			<include type="jar" />
-		</dependency> -->
 		<dependency org="org.apache.ws.commons.util" name="ws-commons-util" rev="1.0.2" conf="openmeetings->*" transitive="false">
 			<include type="jar" />
 		</dependency>
@@ -228,7 +229,10 @@
 		<dependency org="javax.servlet" name="servlet-api" rev="2.5" conf="openmeetings.axis2->*" transitive="false">
 			<include type="jar" />
 		</dependency>
-		<dependency org="org.apache.ws.commons.axiom" name="axiom-impl" rev="1.2.12" conf="openmeetings.axis2->*" transitive="true"/>
+		<dependency org="org.apache.ws.commons.axiom" name="axiom-impl" rev="1.2.12" conf="openmeetings.axis2->*" transitive="true">
+			<exclude name='commons-io' />
+			<exclude name='commons-logging' />
+		</dependency>
 		<dependency org="org.apache.axis2" name="axis2-transport-http" rev="1.7.0-SNAPSHOT" conf="openmeetings.axis2->*"/>
 		<dependency org="org.apache.axis2" name="axis2-transport-local" rev="1.7.0-SNAPSHOT" conf="openmeetings.axis2->*"/>
 		<dependency org="org.apache.axis2" name="mex" rev="1.7.0-SNAPSHOT" conf="openmeetings.axis2->*"/>

Copied: incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/BackupImportController.java (from r1296849, incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/BackupImport.java)
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/BackupImportController.java?p2=incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/BackupImportController.java&p1=incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/BackupImport.java&r1=1296849&r2=1297060&rev=1297060&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/BackupImport.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/BackupImportController.java Mon Mar  5 13:56:25 2012
@@ -18,8 +18,6 @@
  */
 package org.openmeetings.servlet.outputhandler;
 
-import http.utils.multipartrequest.ServletMultipartRequest;
-
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
@@ -91,17 +89,22 @@ import org.openmeetings.app.persistence.
 import org.openmeetings.app.persistence.beans.user.UserSipData;
 import org.openmeetings.app.persistence.beans.user.Users;
 import org.openmeetings.app.remote.red5.ScopeApplicationAdapter;
-import org.openmeetings.utils.ImportHelper;
 import org.openmeetings.utils.math.CalendarPatterns;
 import org.openmeetings.utils.stringhandlers.StringComparer;
 import org.red5.logging.Red5LoggerFactory;
 import org.slf4j.Logger;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.support.DefaultMultipartHttpServletRequest;
 
-public class BackupImport {
+@Controller
+public class BackupImportController {
 
 	private static final Logger log = Red5LoggerFactory.getLogger(
-			BackupImport.class, OpenmeetingsVariables.webAppRootKey);
+			BackupImportController.class, OpenmeetingsVariables.webAppRootKey);
 
 	@Autowired
 	private AppointmentDaoImpl appointmentDao;
@@ -162,6 +165,7 @@ public class BackupImport {
 		USERS, ORGANISATIONS, APPOINTMENTS, ROOMS, MESSAGEFOLDERS, USERCONTACTS, FILEEXPLORERITEMS
 	};
 
+    @RequestMapping(value = "/backup.upload", method = RequestMethod.POST)
 	public void service(HttpServletRequest httpServletRequest,
 			HttpServletResponse httpServletResponse, ServletContext servletCtx)
 			throws ServletException, IOException {
@@ -198,12 +202,10 @@ public class BackupImport {
 						working_dirFile.mkdir();
 					}
 
-					ServletMultipartRequest upload = new ServletMultipartRequest(
-							httpServletRequest, ImportHelper.getMaxUploadSize(
-									cfgManagement, user_level), "UTF8");
-					InputStream is = upload.getFileContents("Filedata");
-
-					String fileSystemName = upload.getBaseFilename("Filedata");
+					DefaultMultipartHttpServletRequest multipartRequest = new DefaultMultipartHttpServletRequest(httpServletRequest);
+					MultipartFile multipartFile = multipartRequest.getFile("Filedata");
+					InputStream is = multipartFile.getInputStream();
+					String fileSystemName = multipartFile.getOriginalFilename();
 
 					StringUtils.deleteWhitespace(fileSystemName);
 

Copied: incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/ImportController.java (from r1296849, incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/Import.java)
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/ImportController.java?p2=incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/ImportController.java&p1=incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/Import.java&r1=1296849&r2=1297060&rev=1297060&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/Import.java (original)
+++ incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/ImportController.java Mon Mar  5 13:56:25 2012
@@ -18,165 +18,57 @@
  */
 package org.openmeetings.servlet.outputhandler;
 
-import http.utils.multipartrequest.ServletMultipartRequest;
-
 import java.io.IOException;
 import java.io.InputStream;
 import java.util.LinkedHashMap;
 
 import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
 import org.openmeetings.app.OpenmeetingsVariables;
 import org.openmeetings.app.data.basic.AuthLevelmanagement;
-import org.openmeetings.app.data.basic.Configurationmanagement;
 import org.openmeetings.app.data.basic.Sessionmanagement;
 import org.openmeetings.app.data.user.Usermanagement;
 import org.openmeetings.app.data.user.dao.UsersDaoImpl;
 import org.openmeetings.app.remote.red5.ScopeApplicationAdapter;
 import org.openmeetings.app.xmlimport.LanguageImport;
 import org.openmeetings.app.xmlimport.UserImport;
-import org.openmeetings.utils.ImportHelper;
 import org.red5.logging.Red5LoggerFactory;
 import org.slf4j.Logger;
-import org.springframework.context.ApplicationContext;
-import org.springframework.web.context.support.WebApplicationContextUtils;
-
-public class Import extends HttpServlet {
-	private static final long serialVersionUID = 582610358088411294L;
-	private static final Logger log = Red5LoggerFactory.getLogger(Import.class,
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.support.DefaultMultipartHttpServletRequest;
+
+@Controller
+public class ImportController {
+	private static final Logger log = Red5LoggerFactory.getLogger(ImportController.class,
 			OpenmeetingsVariables.webAppRootKey);
 
-	public Sessionmanagement getSessionManagement() {
-		try {
-			if (ScopeApplicationAdapter.initComplete) {
-				ApplicationContext context = WebApplicationContextUtils
-						.getWebApplicationContext(getServletContext());
-				return (Sessionmanagement) context.getBean("sessionManagement");
-			}
-		} catch (Exception err) {
-			log.error("[getSessionManagement]", err);
-		}
-		return null;
-	}
-
-	public Usermanagement getUserManagement() {
-		try {
-			if (ScopeApplicationAdapter.initComplete) {
-				ApplicationContext context = WebApplicationContextUtils
-						.getWebApplicationContext(getServletContext());
-				return (Usermanagement) context.getBean("userManagement");
-			}
-		} catch (Exception err) {
-			log.error("[getUserManagement]", err);
-		}
-		return null;
-	}
-
-	public Configurationmanagement getCfgManagement() {
-		try {
-			if (ScopeApplicationAdapter.initComplete) {
-				ApplicationContext context = WebApplicationContextUtils
-						.getWebApplicationContext(getServletContext());
-				return (Configurationmanagement) context.getBean("cfgManagement");
-			}
-		} catch (Exception err) {
-			log.error("[getUserManagement]", err);
-		}
-		return null;
-	}
-
-	public UsersDaoImpl getUsersDao() {
-		try {
-			if (ScopeApplicationAdapter.initComplete) {
-				ApplicationContext context = WebApplicationContextUtils
-						.getWebApplicationContext(getServletContext());
-				return (UsersDaoImpl) context.getBean("usersDao");
-			}
-		} catch (Exception err) {
-			log.error("[getUsersDao]", err);
-		}
-		return null;
-	}
-
-	public ScopeApplicationAdapter getScopeApplicationAdapter() {
-		try {
-			if (ScopeApplicationAdapter.initComplete) {
-				ApplicationContext context = WebApplicationContextUtils
-						.getWebApplicationContext(getServletContext());
-				return (ScopeApplicationAdapter) context
-						.getBean("web.handler");
-			}
-		} catch (Exception err) {
-			log.error("[getScopeApplicationAdapter]", err);
-		}
-		return null;
-	}
-	
-	public UserImport getUserImport() {
-		try {
-			if (ScopeApplicationAdapter.initComplete) {
-				ApplicationContext context = WebApplicationContextUtils
-						.getWebApplicationContext(getServletContext());
-				return (UserImport) context
-						.getBean("userImport");
-			}
-		} catch (Exception err) {
-			log.error("[getScopeApplicationAdapter]", err);
-		}
-		return null;
-	}
-	
-	public AuthLevelmanagement getAuthLevelManagement() {
-		try {
-			if (ScopeApplicationAdapter.initComplete) {
-				ApplicationContext context = WebApplicationContextUtils
-						.getWebApplicationContext(getServletContext());
-				return (AuthLevelmanagement) context
-						.getBean("authLevelManagement");
-			}
-		} catch (Exception err) {
-			log.error("[getAuthLevelManagement]", err);
-		}
-		return null;
-	}
+	@Autowired
+	private Sessionmanagement sessionManagement;
+	@Autowired
+	private Usermanagement userManagement;
+	@Autowired
+	private UsersDaoImpl usersDao;
+	@Autowired
+	private ScopeApplicationAdapter scopeApplicationAdapter;
+	@Autowired
+	private UserImport userImport;
+	@Autowired
+	private AuthLevelmanagement authLevelManagement;
+	@Autowired
+	private LanguageImport languageImport;
 	
-	public LanguageImport getLanguageImport() {
-		try {
-			if (ScopeApplicationAdapter.initComplete) {
-				ApplicationContext context = WebApplicationContextUtils
-						.getWebApplicationContext(getServletContext());
-				return (LanguageImport) context
-						.getBean("languageImport");
-			}
-		} catch (Exception err) {
-			log.error("[getLanguageImport]", err);
-		}
-		return null;
-	}
-	
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * javax.servlet.http.HttpServlet#doPost(javax.servlet.http.HttpServletRequest
-	 * , javax.servlet.http.HttpServletResponse)
-	 */
-	@Override
+    @RequestMapping(value = "/import.upload", method = RequestMethod.POST)
 	protected void service(HttpServletRequest httpServletRequest,
 			HttpServletResponse httpServletResponse) throws ServletException,
 			IOException {
 
 		try {
-
-			if (getUserManagement() == null || getAuthLevelManagement() == null
-					|| getScopeApplicationAdapter() == null || getUserImport() == null
-					|| getSessionManagement() == null || getUsersDao() == null) {
-				return;
-			}
-
 			String sid = httpServletRequest.getParameter("sid");
 			if (sid == null) {
 				sid = "default";
@@ -188,8 +80,8 @@ public class Import extends HttpServlet 
 				moduleName = "moduleName";
 			}
 			log.debug("moduleName: " + moduleName);
-			Long users_id = getSessionManagement().checkSession(sid);
-			Long user_level = getUserManagement().getUserLevelByID(users_id);
+			Long users_id = sessionManagement.checkSession(sid);
+			Long user_level = userManagement.getUserLevelByID(users_id);
 
 			String publicSID = httpServletRequest.getParameter("publicSID");
 			if (publicSID == null) {
@@ -202,14 +94,14 @@ public class Import extends HttpServlet 
 			log.debug("moduleName: " + moduleName);
 
 			// if (user_level!=null && user_level > 0) {
-			if (getAuthLevelManagement().checkAdminLevel(user_level)) {
-				ServletMultipartRequest upload = new ServletMultipartRequest(
-						httpServletRequest, ImportHelper.getMaxUploadSize(getCfgManagement(), user_level), "UTF8");
-				InputStream is = upload.getFileContents("Filedata");
+			if (authLevelManagement.checkAdminLevel(user_level)) {
+				DefaultMultipartHttpServletRequest multipartRequest = new DefaultMultipartHttpServletRequest(httpServletRequest);
+				MultipartFile multipartFile = multipartRequest.getFile("Filedata");
+				InputStream is = multipartFile.getInputStream();
 
 				if (moduleName.equals("users")) {
 					log.error("Import Users");
-					getUserImport().addUsersByDocument(is);
+					userImport.addUsersByDocument(is);
 
 				} else if (moduleName.equals("language")) {
 					log.error("Import Language");
@@ -221,7 +113,7 @@ public class Import extends HttpServlet 
 					Long language_id = Long.valueOf(language).longValue();
 					log.debug("language_id: " + language_id);
 
-					getLanguageImport().addLanguageByDocument(
+					languageImport.addLanguageByDocument(
 							language_id, is);
 				}
 			} else {
@@ -231,7 +123,7 @@ public class Import extends HttpServlet 
 			log.debug("Return And Close");
 
 			LinkedHashMap<String, Object> hs = new LinkedHashMap<String, Object>();
-			hs.put("user", getUsersDao().getUser(users_id));
+			hs.put("user", usersDao.getUser(users_id));
 			hs.put("message", "library");
 			hs.put("action", "import");
 
@@ -239,7 +131,7 @@ public class Import extends HttpServlet 
 
 			log.debug("moduleName.equals(userprofile) ! ");
 
-			getScopeApplicationAdapter().sendMessageWithClientByPublicSID(hs,
+			scopeApplicationAdapter.sendMessageWithClientByPublicSID(hs,
 					publicSID);
 
 			return;

Added: incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/UploadController.java
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/UploadController.java?rev=1297060&view=auto
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/UploadController.java (added)
+++ incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/UploadController.java Mon Mar  5 13:56:25 2012
@@ -0,0 +1,476 @@
+package org.openmeetings.servlet.outputhandler;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+import org.apache.commons.lang.StringUtils;
+import org.openmeetings.app.OpenmeetingsVariables;
+import org.openmeetings.app.data.basic.Sessionmanagement;
+import org.openmeetings.app.data.file.FileProcessor;
+import org.openmeetings.app.data.file.dao.FileExplorerItemDaoImpl;
+import org.openmeetings.app.data.user.Usermanagement;
+import org.openmeetings.app.data.user.dao.UsersDaoImpl;
+import org.openmeetings.app.documents.GenerateImage;
+import org.openmeetings.app.documents.GeneratePDF;
+import org.openmeetings.app.documents.GenerateThumbs;
+import org.openmeetings.app.persistence.beans.user.Users;
+import org.openmeetings.app.remote.red5.ScopeApplicationAdapter;
+import org.openmeetings.utils.StoredFile;
+import org.openmeetings.utils.stringhandlers.StringComparer;
+import org.red5.logging.Red5LoggerFactory;
+import org.slf4j.Logger;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.MultipartHttpServletRequest;
+
+@Controller
+public class UploadController {
+	private static final Logger log = Red5LoggerFactory.getLogger(
+			UploadController.class, OpenmeetingsVariables.webAppRootKey);
+	
+	@Autowired
+	private Sessionmanagement sessionManagement;
+	@Autowired
+	private Usermanagement userManagement;
+	@Autowired
+	private UsersDaoImpl usersDao;
+	@Autowired
+	private ScopeApplicationAdapter scopeApplicationAdapter;
+	@Autowired
+	private GeneratePDF generatePDF;
+	@Autowired
+	private GenerateThumbs generateThumbs;
+	@Autowired
+	private GenerateImage generateImage;
+	@Autowired
+	private FileProcessor fileProcessor;
+	@Autowired
+	private FileExplorerItemDaoImpl fileExplorerItemDao;
+
+	private String filesString[] = null;
+	
+    @RequestMapping(value = "/file.upload", method = RequestMethod.POST)
+    public void handleFileUpload(HttpServletRequest request, HttpServletResponse response, HttpSession session) throws ServletException {
+    	handleFormUpload(request, response, true);
+    }
+
+    @RequestMapping(value = "/upload.upload", method = RequestMethod.POST)
+    public void handleFormUpload(HttpServletRequest request, HttpServletResponse response) throws ServletException {
+    	handleFormUpload(request, response, false);
+    }
+
+    private void handleFormUpload(HttpServletRequest request, HttpServletResponse response, boolean isFileEx) throws ServletException {
+		log.debug("starting upload");
+		try {
+			int contentLength = request.getContentLength();
+			if (contentLength <= 0) {
+				log.debug("ContentLength = " + contentLength + ", aborted");
+				return;
+			}
+			log.debug("uploading " + contentLength + " bytes");
+
+			String sid = request.getParameter("sid");
+			if (sid == null) {
+				throw new ServletException("Missing SID");
+			}
+			log.debug("sid: " + sid);
+
+			Long userId = sessionManagement.checkSession(sid);
+			Long userLevel = userManagement.getUserLevelByID(userId);
+			log.debug("userId = " + userId + ", userLevel = " + userLevel);
+
+			if (userLevel <= 0) {
+				log.debug("insufficient user level " + userLevel);
+				return;
+			}
+
+			String publicSID = request.getParameter("publicSID");
+			if (publicSID == null) {
+				// Always ask for Public SID
+				throw new ServletException("Missing publicSID");
+			}
+
+			LinkedHashMap<String, Object> hs = new LinkedHashMap<String, Object>();
+			hs.put("user", usersDao.getUser(userId));
+
+			if (isFileEx) {
+				fileExService(request, sid, userId, hs);
+			} else {
+				fileService(request, sid, userId, hs);
+			}
+			scopeApplicationAdapter.sendMessageWithClientByPublicSID(hs,
+					publicSID);
+		} catch (Exception e) {
+			System.out.println("Exception during upload: " + e);
+			e.printStackTrace();
+			throw new ServletException(e);
+		}
+    }
+    
+    private void fileService(HttpServletRequest request,
+			String sid, Long userId, Map<String, Object> hs)
+			throws ServletException, Exception {
+
+		String room_id = request.getParameter("room_id");
+		if (room_id == null) {
+			room_id = "default";
+		}
+		String roomName = StringUtils.deleteWhitespace(room_id);
+
+		String moduleName = request.getParameter("moduleName");
+		if (moduleName == null) {
+			moduleName = "nomodule";
+		}
+		if (moduleName.equals("nomodule")) {
+			log.debug("module name missed");
+			return;
+		}
+		boolean userProfile = moduleName.equals("userprofile");
+
+		MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest)request;
+		MultipartFile multipartFile = multipartRequest.getFile("Filedata");
+		InputStream is = multipartFile.getInputStream();
+		String fileSystemName = multipartFile.getOriginalFilename();
+		fileSystemName = StringUtils.deleteWhitespace(fileSystemName);
+
+		// Flash cannot read the response of an upload
+		// httpServletResponse.getWriter().print(returnError);
+		uploadFile(request, userProfile, userId, roomName, is, fileSystemName, hs);
+	}
+
+	private void uploadFile(HttpServletRequest request, boolean userProfile, Long userId, String roomName,
+			InputStream is, String fileSystemName, Map<String, Object> hs)
+			throws Exception {
+		HashMap<String, HashMap<String, String>> returnError = new HashMap<String, HashMap<String, String>>();
+
+		// Get the current user directory
+		String currentDir = request.getRealPath("/");
+		String workingDir = currentDir + "upload" + File.separatorChar
+				+ roomName + File.separatorChar;
+		log.debug("workingDir: " + workingDir);
+
+		File localFolder = new File(workingDir);
+		if (!localFolder.exists()) {
+			localFolder.mkdirs();
+		}
+
+		// Check variable to see if this file is a presentation
+		int dotidx = fileSystemName.lastIndexOf('.');
+		String newFileName = StringComparer.getInstance().compareForRealPaths(
+				fileSystemName.substring(0, dotidx));
+		String newFileExtDot = fileSystemName.substring(dotidx,
+				fileSystemName.length()).toLowerCase();
+		String newFileExt = newFileExtDot.substring(1);
+
+		// trim long names cause cannot output that
+		final int MAX_FILE_NAME_LENGTH = 30;
+		if (newFileName.length() >= MAX_FILE_NAME_LENGTH) {
+			newFileName = newFileName.substring(0, MAX_FILE_NAME_LENGTH);
+		}
+		StoredFile storedFile = new StoredFile(newFileName, newFileExt);
+
+		// check if this is a a file that can be converted by
+		// openoffice-service
+		boolean canBeConverted = storedFile.isConvertable();
+		boolean isPdf = storedFile.isPdf();
+		boolean isImage = storedFile.isImage();
+		boolean isAsIs = storedFile.isAsIs();
+
+		String completeName = "";
+
+		// add outputfolders for profiles
+		if (userProfile) {
+			// User Profile Update
+			this.deleteUserProfileFilesStoreTemp(currentDir, userId);
+
+			completeName = currentDir + "upload" + File.separatorChar
+					+ "profiles" + File.separatorChar;
+			File f = new File(completeName);
+			if (!f.exists()) {
+				boolean c = f.mkdir();
+				if (!c) {
+					log.error("cannot write to directory");
+					// System.out.println("cannot write to directory");
+				}
+			}
+			completeName += ScopeApplicationAdapter.profilesPrefix + userId
+					+ File.separatorChar;
+			File f2 = new File(completeName);
+			if (!f2.exists()) {
+				boolean c = f2.mkdir();
+				if (!c) {
+					log.error("cannot write to directory");
+					// System.out.println("cannot write to directory");
+				}
+			}
+		}
+		// if it is a presenation it will be copied to another
+		// place
+		if (isAsIs) {
+			// check if this is a room file or UserProfile
+			if (userProfile) {
+				completeName += newFileName;
+			} else {
+				completeName = workingDir + newFileName;
+			}
+		} else if (canBeConverted || isPdf || isImage) {
+			// check if this is a room file or UserProfile
+			// add Temp folder structure
+			String workingDirPpt = currentDir
+					+ "uploadtemp"
+					+ File.separatorChar
+					+ ((userProfile) ? "profiles" + File.separatorChar
+							+ ScopeApplicationAdapter.profilesPrefix + userId
+							: roomName) + File.separatorChar;
+			localFolder = new File(workingDirPpt);
+			if (!localFolder.exists()) {
+				localFolder.mkdirs();
+			}
+			completeName = workingDirPpt + newFileName;
+		} else {
+			return;
+		}
+
+		File f = new File(completeName + newFileExtDot);
+		if (f.exists()) {
+			int recursiveNumber = 0;
+			String tempd = completeName + "_" + recursiveNumber;
+			while (f.exists()) {
+				recursiveNumber++;
+				tempd = completeName + "_" + recursiveNumber;
+				f = new File(tempd + newFileExtDot);
+
+			}
+			completeName = tempd;
+		}
+
+		log.debug("write file to : " + completeName + newFileExtDot);
+
+		FileOutputStream fos = new FileOutputStream(completeName
+				+ newFileExtDot);
+		byte[] buffer = new byte[1024];
+		int len = 0;
+
+		while (len != (-1)) {
+			len = is.read(buffer, 0, 1024);
+			if (len != (-1))
+				fos.write(buffer, 0, len);
+		}
+
+		fos.close();
+		is.close();
+
+		log.debug("canBeConverted: " + canBeConverted);
+		if (canBeConverted) {
+			// convert to pdf, thumbs, swf and xml-description
+			returnError = generatePDF.convertPDF(currentDir, newFileName,
+					newFileExtDot, roomName, true, completeName);
+		} else if (isPdf) {
+			
+			boolean isEncrypted = true; 
+			
+			// Check requires iText.jar => iText is AGPL and won't work with Apache Release
+//			boolean isEncrypted = false;
+//			try {
+//				// Check if PDF is encrpyted
+//				PdfReader pdfReader = new PdfReader(completeName
+//						+ newFileExtDot);
+//
+//				log.debug("pdfReader.isEncrypted() :: "
+//						+ pdfReader.isEncrypted());
+//
+//				log.debug("isMetadataEncrypted : "
+//						+ pdfReader.isMetadataEncrypted());
+//				log.debug("is128Key : " + pdfReader.is128Key());
+//				log.debug("isEncrypted : " + pdfReader.isEncrypted());
+//
+//				if (pdfReader.isEncrypted()) {
+//					isEncrypted = true;
+//				}
+//
+//			} catch (Exception err) {
+//				log.error("isEncrypted ", err);
+//				isEncrypted = true;
+//			}
+
+			log.debug("isEncrypted :: " + isEncrypted);
+
+			@SuppressWarnings("unused")
+			HashMap<String, String> returnError2 = new HashMap<String, String>();
+
+			if (isEncrypted) {
+				// Do convert pdf to other pdf first
+				String inputfile = completeName + newFileExtDot;
+
+				completeName = completeName + "_N_E";
+				newFileName = newFileName + "_N_E";
+
+				String outputfile = completeName + newFileExtDot;
+
+				returnError2 = generateThumbs.decodePDF(inputfile,
+						outputfile);
+
+				File f_old = new File(inputfile);
+				if (f_old.exists()) {
+					f_old.delete();
+				}
+
+			}
+
+			// convert to thumbs, swf and xml-description
+			returnError = generatePDF.convertPDF(currentDir, newFileName,
+					newFileExtDot, roomName, false, completeName);
+
+			// returnError.put("decodePDF", returnError2);
+
+		} else if (isImage && !isAsIs) {
+
+			log.debug("##### isImage! userProfilePic: " + userProfile);
+
+			if (userProfile) {
+				// User Profile Update
+				this.deleteUserProfileFiles(currentDir, userId);
+				// convert it to JPG
+				returnError = generateImage.convertImageUserProfile(
+						currentDir, newFileName, newFileExtDot, userId,
+						newFileName, false);
+			} else {
+				// convert it to JPG
+				log.debug("##### convert it to JPG: " + userProfile);
+				returnError = generateImage.convertImage(currentDir,
+						newFileName, newFileExtDot, roomName, newFileName,
+						false);
+			}
+		} else if (isAsIs) {
+			if (userProfile) {
+				// User Profile Update
+				this.deleteUserProfileFiles(currentDir, userId);
+				// is UserProfile Picture
+				HashMap<String, String> processThumb1 = generateThumbs
+						.generateThumb("_chat_", currentDir, completeName, 40);
+				HashMap<String, String> processThumb2 = generateThumbs
+						.generateThumb("_profile_", currentDir, completeName,
+								126);
+				HashMap<String, String> processThumb3 = generateThumbs
+						.generateThumb("_big_", currentDir, completeName, 240);
+				returnError.put("processThumb1", processThumb1);
+				returnError.put("processThumb2", processThumb2);
+				returnError.put("processThumb3", processThumb3);
+
+				File fileNameToStore = new File(completeName + ".jpg");
+				String pictureuri = fileNameToStore.getName();
+				Users us = usersDao.getUser(userId);
+				us.setUpdatetime(new java.util.Date());
+				us.setPictureuri(pictureuri);
+				usersDao.updateUser(us);
+
+				//FIXME: After updating the picture url all other users should refresh
+			} else {
+				HashMap<String, String> processThumb = generateThumbs
+						.generateThumb("_thumb_", currentDir, completeName, 50);
+				returnError.put("processThumb", processThumb);
+			}
+		}
+
+		hs.put("message", "library");
+		hs.put("action", "newFile");
+		hs.put("error", returnError);
+		hs.put("fileName", completeName);
+	}
+
+	private void deleteUserProfileFilesStoreTemp(String current_dir,
+			Long users_id) throws Exception {
+
+		String working_imgdir = current_dir + "upload" + File.separatorChar
+				+ "profiles" + File.separatorChar
+				+ ScopeApplicationAdapter.profilesPrefix + users_id
+				+ File.separatorChar;
+		File f = new File(working_imgdir);
+		if (f.exists() && f.isDirectory()) {
+			this.filesString = f.list();
+		}
+	}
+
+	private void deleteUserProfileFiles(String current_dir, Long users_id)
+			throws Exception {
+
+		String working_imgdir = current_dir + "upload" + File.separatorChar
+				+ "profiles" + File.separatorChar
+				+ ScopeApplicationAdapter.profilesPrefix + users_id
+				+ File.separatorChar;
+
+		for (int i = 0; i < this.filesString.length; i++) {
+			String fileName = filesString[i];
+			File subf = new File(working_imgdir + fileName);
+			subf.delete();
+		}
+	}
+
+	private void fileExService(HttpServletRequest request,
+			String sid, Long userId, Map<String, Object> hs)
+			throws ServletException, Exception {
+
+		String room_idAsString = request.getParameter("room_id");
+		if (room_idAsString == null) {
+			throw new ServletException("Missing Room ID");
+		}
+
+		Long room_id_to_Store = Long.parseLong(room_idAsString);
+
+		String isOwnerAsString = request.getParameter("isOwner");
+		if (isOwnerAsString == null) {
+			throw new ServletException("Missing isOwnerAsString");
+		}
+		boolean isOwner = false;
+		if (isOwnerAsString.equals("1")) {
+			isOwner = true;
+		}
+
+		String parentFolderIdAsString = request
+				.getParameter("parentFolderId");
+		if (parentFolderIdAsString == null) {
+			throw new ServletException("Missing parentFolderId ID");
+		}
+		Long parentFolderId = Long.parseLong(parentFolderIdAsString);
+
+		String current_dir = request.getRealPath("/");
+
+		MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest)request;
+		MultipartFile multipartFile = multipartRequest.getFile("Filedata");
+		InputStream is = multipartFile.getInputStream();
+		String fileSystemName = multipartFile.getOriginalFilename();
+		log.debug("fileSystemName: " + fileSystemName);
+
+		HashMap<String, HashMap<String, String>> returnError = fileProcessor
+				.processFile(userId, room_id_to_Store, isOwner, is,
+						parentFolderId, fileSystemName, current_dir, hs, 0L, ""); // externalFilesId,
+																					// externalType
+
+		HashMap<String, String> returnAttributes = returnError
+				.get("returnAttributes");
+
+		// Flash cannot read the response of an upload
+		// httpServletResponse.getWriter().print(returnError);
+		hs.put("message", "library");
+		hs.put("action", "newFile");
+		hs.put("fileExplorerItem",
+				fileExplorerItemDao.getFileExplorerItemsById(
+						Long.parseLong(returnAttributes.get(
+								"fileExplorerItemId").toString())));
+		hs.put("error", returnError);
+		hs.put("fileName", returnAttributes.get("completeName"));
+
+	}
+}