diff --git a/pom.xml b/pom.xml index a81b46a..a32fd6d 100644 --- a/pom.xml +++ b/pom.xml @@ -20,6 +20,42 @@ + + jakarta.servlet.jsp.jstl + jakarta.servlet.jsp.jstl-api + 3.0.0 + + + + + + org.glassfish.web + jakarta.servlet.jsp.jstl + 3.0.1 + + + + jakarta.ejb jakarta.ejb-api diff --git a/src/main/java/ru/molokoin/storage/api/RestStorageService.java b/src/main/java/ru/molokoin/storage/api/RestStorageService.java index e45464a..06894dd 100644 --- a/src/main/java/ru/molokoin/storage/api/RestStorageService.java +++ b/src/main/java/ru/molokoin/storage/api/RestStorageService.java @@ -60,7 +60,7 @@ public class RestStorageService { System.out.println("Передача данных о контенте из файловой системы ..."); Collection cce = new ArrayList<>(); try { - Set list = HardDrive.listFiles(HardDrive.getRoot()); + Set list = HardDrive.listFiles(); int i = 1; for (String path : list) { ContentEntity ce = new ContentEntity(); @@ -85,7 +85,7 @@ public class RestStorageService { Collection cce = new ArrayList<>(); ContentEntity ce = new ContentEntity(); try { - Set list = HardDrive.listFiles(HardDrive.getRoot()); + Set list = HardDrive.listFiles(); int i = 1; for (String path : list) { if (id == i) { @@ -103,34 +103,6 @@ public class RestStorageService { return ce; } - - - - - - // @GET - // @Path("{id}") - // @Produces(MediaType.APPLICATION_OCTET_STREAM) - // //@Produces(MediaType.MULTIPART_FORM_DATA) - // public Response getContent(@PathParam("id") Integer id, @Context HttpServletResponse response){ - // System.out.println("Передача байткода по id файла ..."); - - // return storage.findContentById(id); - // } - - // @GET - // @Path("{id}") - // @Produces(MediaType.APPLICATION_OCTET_STREAM) - // public File getFile(@PathParam("id") Integer id, @Context HttpServletResponse response) { - // ContentEntity ce = getInfoById(1, response); - - // File file = new File(ce.getLocation()); // Initialize this to the File path you want to serve. - // // return Response.ok(file, MediaType.APPLICATION_OCTET_STREAM) - // // .header("Content-Disposition", "attachment; filename=\"" + file.getName() + "\"" ) //optional - // // .build(); - // return file; - // } - /** * Получение файла (*.pdf) на просмотр по id * !!! добавить возможность открытия файлов других типов diff --git a/src/main/java/ru/molokoin/storage/beans/HardDrive.java b/src/main/java/ru/molokoin/storage/beans/HardDrive.java index 4411bae..68e6224 100644 --- a/src/main/java/ru/molokoin/storage/beans/HardDrive.java +++ b/src/main/java/ru/molokoin/storage/beans/HardDrive.java @@ -31,7 +31,8 @@ public class HardDrive { * @return * @throws IOException */ - public static Set listFiles(String path) throws IOException{ + public static Set listFiles() throws IOException{ + String path = root; Stream stream = Files.list(Paths.get(path)); Set list = stream .filter(file -> !Files.isDirectory(file)) @@ -62,7 +63,7 @@ public class HardDrive { public static Path getFileById(int id) throws IOException{ Path path = null; - Set set = listFiles(root); + Set set = listFiles(); int i = 0; for (String s : set) { i++; diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml index 9f88c1f..8ae8a72 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/src/main/webapp/WEB-INF/web.xml @@ -1,7 +1,10 @@ - + + + + Archetype Created Web Application - - Archetype Created Web Application diff --git a/src/main/webapp/index.jsp b/src/main/webapp/index.jsp index c38169b..acdf195 100644 --- a/src/main/webapp/index.jsp +++ b/src/main/webapp/index.jsp @@ -1,5 +1,65 @@ + +<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml" %> +<%@page import="java.util.Set"%> + + + + + + storage + + -

Hello World!

+
+

STORAGE:FACE

+
+ +
+
+
+

LIST of FILES:

+ + + + + + + +
+
+ + +
+
+ +
+
+ + + + + +
+
+ + diff --git a/src/main/webapp/layout/styles.css b/src/main/webapp/layout/styles.css new file mode 100644 index 0000000..4fed8a6 --- /dev/null +++ b/src/main/webapp/layout/styles.css @@ -0,0 +1,38 @@ +body { + background-color: #abe; + padding: 0; + margin: 0; +} +header { + display: block; + width: 100%; + /* height: 50px; */ +} +main { + background-color: black; +} + +.container { + background-color: blueviolet; + position: relative; + /* overflow: hidden; */ + width: 100%; + /* height: 100%; */ + /* padding-top: 56.25%; //16:9 Aspect Ratio */ + } + +.guide { + display: block; + width: 100%; + /* height: 100%; */ + background-color: rgb(63, 106, 236); +} +iframe { + /* position: relative; */ + top: 0; + left: 0; + bottom: 0; + right: 0; + width: 100%; + height: 100%; + } \ No newline at end of file diff --git a/target/classes/ru/molokoin/storage/api/RestStorageService.class b/target/classes/ru/molokoin/storage/api/RestStorageService.class index e87b662..9632a1d 100644 Binary files a/target/classes/ru/molokoin/storage/api/RestStorageService.class and b/target/classes/ru/molokoin/storage/api/RestStorageService.class differ diff --git a/target/classes/ru/molokoin/storage/beans/HardDrive.class b/target/classes/ru/molokoin/storage/beans/HardDrive.class index 0b2ed93..91ae864 100644 Binary files a/target/classes/ru/molokoin/storage/beans/HardDrive.class and b/target/classes/ru/molokoin/storage/beans/HardDrive.class differ diff --git a/target/storage.war b/target/storage.war index f4309ed..c00c032 100644 Binary files a/target/storage.war and b/target/storage.war differ diff --git a/target/storage/WEB-INF/classes/ru/molokoin/storage/api/RestStorageService.class b/target/storage/WEB-INF/classes/ru/molokoin/storage/api/RestStorageService.class index 5e619b1..9632a1d 100644 Binary files a/target/storage/WEB-INF/classes/ru/molokoin/storage/api/RestStorageService.class and b/target/storage/WEB-INF/classes/ru/molokoin/storage/api/RestStorageService.class differ diff --git a/target/storage/WEB-INF/classes/ru/molokoin/storage/beans/HardDrive.class b/target/storage/WEB-INF/classes/ru/molokoin/storage/beans/HardDrive.class index 64d2f9a..91ae864 100644 Binary files a/target/storage/WEB-INF/classes/ru/molokoin/storage/beans/HardDrive.class and b/target/storage/WEB-INF/classes/ru/molokoin/storage/beans/HardDrive.class differ diff --git a/target/storage/WEB-INF/lib/jakarta.el-api-5.0.0.jar b/target/storage/WEB-INF/lib/jakarta.el-api-5.0.0.jar new file mode 100644 index 0000000..5a2fd40 Binary files /dev/null and b/target/storage/WEB-INF/lib/jakarta.el-api-5.0.0.jar differ diff --git a/target/storage/WEB-INF/lib/jakarta.servlet.jsp.jstl-3.0.1.jar b/target/storage/WEB-INF/lib/jakarta.servlet.jsp.jstl-3.0.1.jar new file mode 100644 index 0000000..6b2f43f Binary files /dev/null and b/target/storage/WEB-INF/lib/jakarta.servlet.jsp.jstl-3.0.1.jar differ diff --git a/target/storage/WEB-INF/lib/jakarta.servlet.jsp.jstl-api-3.0.0.jar b/target/storage/WEB-INF/lib/jakarta.servlet.jsp.jstl-api-3.0.0.jar new file mode 100644 index 0000000..ec63e6a Binary files /dev/null and b/target/storage/WEB-INF/lib/jakarta.servlet.jsp.jstl-api-3.0.0.jar differ diff --git a/target/storage/WEB-INF/web.xml b/target/storage/WEB-INF/web.xml index 9f88c1f..8ae8a72 100644 --- a/target/storage/WEB-INF/web.xml +++ b/target/storage/WEB-INF/web.xml @@ -1,7 +1,10 @@ - + + + + Archetype Created Web Application - - Archetype Created Web Application diff --git a/target/storage/index.jsp b/target/storage/index.jsp index c38169b..acdf195 100644 --- a/target/storage/index.jsp +++ b/target/storage/index.jsp @@ -1,5 +1,65 @@ + +<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml" %> +<%@page import="java.util.Set"%> + + + + + + storage + + -

Hello World!

+
+

STORAGE:FACE

+
+ +
+
+
+

LIST of FILES:

+ + + + + + + +
+
+ + +
+
+ +
+
+ + + + + +
+ + + diff --git a/target/storage/layout/styles.css b/target/storage/layout/styles.css new file mode 100644 index 0000000..4fed8a6 --- /dev/null +++ b/target/storage/layout/styles.css @@ -0,0 +1,38 @@ +body { + background-color: #abe; + padding: 0; + margin: 0; +} +header { + display: block; + width: 100%; + /* height: 50px; */ +} +main { + background-color: black; +} + +.container { + background-color: blueviolet; + position: relative; + /* overflow: hidden; */ + width: 100%; + /* height: 100%; */ + /* padding-top: 56.25%; //16:9 Aspect Ratio */ + } + +.guide { + display: block; + width: 100%; + /* height: 100%; */ + background-color: rgb(63, 106, 236); +} +iframe { + /* position: relative; */ + top: 0; + left: 0; + bottom: 0; + right: 0; + width: 100%; + height: 100%; + } \ No newline at end of file