diff --git a/YACOSWeb/WebContent/WEB-INF/fileupload.xml b/YACOSWeb/WebContent/WEB-INF/fileupload.xml
deleted file mode 100644
index 7e59a39..0000000
--- a/YACOSWeb/WebContent/WEB-INF/fileupload.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/YACOSWeb/WebContent/WEB-INF/jsp/submissionArticle.jsp b/YACOSWeb/WebContent/WEB-INF/jsp/submissionArticle.jsp
index 9e1759d..3866697 100644
--- a/YACOSWeb/WebContent/WEB-INF/jsp/submissionArticle.jsp
+++ b/YACOSWeb/WebContent/WEB-INF/jsp/submissionArticle.jsp
@@ -5,13 +5,25 @@
+
+
+
-
+
@@ -20,12 +32,21 @@
- >
- >
+
+ >
+
+ >
-
+
+
+
+
-
+
+
+ File :
+
+
>
>
diff --git a/YACOSWeb/WebContent/WEB-INF/jsp/submissionArticleFile.jsp b/YACOSWeb/WebContent/WEB-INF/jsp/submissionArticleFile.jsp
deleted file mode 100644
index 7f9d1ad..0000000
--- a/YACOSWeb/WebContent/WEB-INF/jsp/submissionArticleFile.jsp
+++ /dev/null
@@ -1,45 +0,0 @@
-<%@ page contentType="text/html" %>
-<%@ page session="true" %>
-<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
-<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
-
-
-
-
-Insert title here
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/YACOSWeb/WebContent/WEB-INF/lib/ognl-2.6.9.jar b/YACOSWeb/WebContent/WEB-INF/lib/ognl-2.6.9.jar
deleted file mode 100644
index 0f1c0fb..0000000
Binary files a/YACOSWeb/WebContent/WEB-INF/lib/ognl-2.6.9.jar and /dev/null differ
diff --git a/YACOSWeb/WebContent/WEB-INF/lib/spring-webflow-1.0.5.jar b/YACOSWeb/WebContent/WEB-INF/lib/spring-webflow-1.0.5.jar
deleted file mode 100644
index fda7fce..0000000
Binary files a/YACOSWeb/WebContent/WEB-INF/lib/spring-webflow-1.0.5.jar and /dev/null differ
diff --git a/YACOSWeb/WebContent/WEB-INF/yacos-servlet.xml b/YACOSWeb/WebContent/WEB-INF/yacos-servlet.xml
index 8f4eb7a..6e454d1 100644
--- a/YACOSWeb/WebContent/WEB-INF/yacos-servlet.xml
+++ b/YACOSWeb/WebContent/WEB-INF/yacos-servlet.xml
@@ -1,13 +1,10 @@
@@ -22,17 +19,17 @@
-
+
-
+
@@ -43,28 +40,11 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
+
-
-
+
diff --git a/YACOSWeb/src/org/yacos/web/author/controller/SArticleController.java b/YACOSWeb/src/org/yacos/web/author/controller/SArticleController.java
index 0cbd879..4ec6e3a 100644
--- a/YACOSWeb/src/org/yacos/web/author/controller/SArticleController.java
+++ b/YACOSWeb/src/org/yacos/web/author/controller/SArticleController.java
@@ -1,10 +1,13 @@
package org.yacos.web.author.controller;
+import java.util.List;
+
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.SimpleFormController;
import org.springframework.web.servlet.view.RedirectView;
@@ -26,8 +29,18 @@ public class SArticleController extends SimpleFormController {
String theme = ((FormSubmission) command).getTheme();
String mainauthor = ((FormSubmission) command).getMainauthor();
String secondaryauthor = ((FormSubmission) command).getSecondaryauthor();
- String file = ((FormSubmission) command).getFile();
+ //String file = ((FormSubmission) command).getFile();
+ String liste = ((FormSubmission) command).getListe();
+
+ System.out.println(liste);
+
+
+ // let's see if there's content there
+ MultipartFile file = ((FormSubmission) command).getFile();
+ if (file == null) {
+ // hmm, that's strange, the user did not upload anything
+ }
Article a = new Article(0, title, theme, "", mainauthor, null, 1);
articleManager.addArticle(a);
@@ -40,8 +53,7 @@ public class SArticleController extends SimpleFormController {
myArticle.setTitle("Le titre de l'article");
myArticle.setTheme("Le theme de l'article");
myArticle.setMainauthor("L'auteur principal");
- myArticle.setSecondaryauthor("Les auteurs n°2");
- myArticle.setFile("Le fichier");
+ myArticle.setSecondaryauthor("Les auteurs secondaires");
return myArticle;
}
diff --git a/YACOSWeb/src/org/yacos/web/author/form/FormSubmission.java b/YACOSWeb/src/org/yacos/web/author/form/FormSubmission.java
index f84aa5d..e363493 100644
--- a/YACOSWeb/src/org/yacos/web/author/form/FormSubmission.java
+++ b/YACOSWeb/src/org/yacos/web/author/form/FormSubmission.java
@@ -1,16 +1,29 @@
package org.yacos.web.author.form;
+import java.util.List;
+
+import org.springframework.web.multipart.MultipartFile;
+
public class FormSubmission {
+ private MultipartFile file;
private String title;
private String theme;
private String mainauthor;
private String secondaryauthor;
- private String file;
+ private String liste;
public FormSubmission() {
}
+
+ public void setFile(MultipartFile file) {
+ this.file = file;
+ }
+
+ public MultipartFile getFile() {
+ return file;
+ }
public String getTitle() {
return title;
@@ -36,11 +49,13 @@ public class FormSubmission {
public void setSecondaryauthor(String secondaryauthor) {
this.secondaryauthor = secondaryauthor;
}
- public String getFile() {
- return file;
+
+ public String getListe() {
+ return liste;
}
- public void setFile(String file) {
- this.file = file;
+
+ public void setListe(String liste) {
+ this.liste = liste;
}
}
diff --git a/YACOSWeb/src/org/yacos/web/utils/FileUploadAction.java b/YACOSWeb/src/org/yacos/web/utils/FileUploadAction.java
deleted file mode 100644
index e103696..0000000
--- a/YACOSWeb/src/org/yacos/web/utils/FileUploadAction.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package org.yacos.web.utils;
-
-import org.springframework.web.multipart.MultipartFile;
-import org.springframework.webflow.action.AbstractAction;
-import org.springframework.webflow.execution.Event;
-import org.springframework.webflow.execution.RequestContext;
-
-public class FileUploadAction extends AbstractAction {
-
- protected Event doExecute(RequestContext context) throws Exception {
- MultipartFile file = context.getRequestParameters().getRequiredMultipartFile("file");
- if (file.getSize() > 0) {
- // data was uploaded
- context.getFlashScope().put("file", new String(file.getBytes()));
- return success();
- } else {
- return error();
- }
- }
-}