Joined: Oct 28, 2021
Post Count: 12
Status:
Offline
Re: Sweet Home 3D JS Online
Hello, I try to deploy sweethome3djs online. But i got error:
HTTP Status 500 - Unable to compile class for JSP: type Exception report
message Unable to compile class for JSP:
description The server encountered an internal error that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 51 in the jsp file: /readHome.jsp Resource specification not allowed here for source level below 1.7 48: } 49: 50: synchronized (homeFile.getAbsolutePath().intern()) { 51: try (InputStream input = new FileInputStream(homeFile); 52: ByteArrayOutputStream output = new ByteArrayOutputStream()) { 53: byte[] buffer = new byte[8096]; 54: int size;
An error occurred at line: 67 in the jsp file: /readHome.jsp Resource specification not allowed here for source level below 1.7 64: 65: response.setIntHeader("Content-length", homeFileContent.length); 66: response.setHeader("Content-Disposition", "attachment; filename=" + homeFile.getName()); 67: try (OutputStream servletOut = response.getOutputStream()) { 68: servletOut.write(homeFileContent); 69: } 70: } %>
java -version openjdk version "1.8.0_312" OpenJDK Runtime Environment (build 1.8.0_312-b07) OpenJDK 64-Bit Server VM (build 25.312-b07, mixed mode)
My Tomcat version:
Server version: Apache Tomcat/7.0.76 Server built: Nov 16 2020 16:51:26 UTC Server number: 7.0.76.0 OS Name: Linux OS Version: 3.10.0-1160.36.2.el7.x86_64 Architecture: amd64 JVM Version: 1.8.0_312-b07 JVM Vendor: Red Hat, Inc.
France
Joined: Nov 7, 2005
Post Count: 9426
Status:
Offline
Re: Sweet Home 3D JS Online
It's strange because even if try (resource) { } syntax is allowed only from Java 7, your server seems to use a JDK 8. Maybe try to run the server with JDK 11.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
Joined: Oct 28, 2021
Post Count: 12
Status:
Offline
Re: Sweet Home 3D JS Online
I tried edit code after google. Wrap try in {} Its working but I don't know write in finally statement. Sorry, I'm working with PHP, and don't know Java. Can you fix that ?
try {InputStream input = new FileInputStream(homeFile); ByteArrayOutputStream output = new ByteArrayOutputStream(); byte[] buffer = new byte[8096]; int size; while ((size = input.read(buffer)) != -1) { output.write(buffer, 0, size); } homeFileContent = output.toByteArray(); } finally{ // write something here ? }
France
Joined: Nov 7, 2005
Post Count: 9426
Status:
Offline
Re: Sweet Home 3D JS Online
You don't have to write anything in finally blocks (note that they don't even exist in the released version of readHome.jsp). I guess you should learn Java before going further...
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
France
Joined: Nov 7, 2005
Post Count: 9426
Status:
Offline
Re: Sweet Home 3D JS Online
A new version of Sweet Home 3D JS Online was released last week-end with many new features. See this blog post for more information.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
France
Joined: Nov 7, 2005
Post Count: 9426
Status:
Offline
Re: Sweet Home 3D JS Online
For your information, I just changed the user interface of the Online version for large touch devices like tablets, to take profit of the additional space they propose. It now shows the 4 classical resizable panes of the desktop version and a larger choice of models in the catalog, either in landscape format:
or in portrait format:
Note also that from the release of version 7.0, it's now possible to modify openings in Sweet Home 3D JS Online and to select a material directly in the 3D model preview in the furniture materials modification dialog box.
I was just wondering if there was a reason why it runs soo much faster in the browser than natively.
I wonder on which particular point you see such a performance difference because I didn't notice it that much. Loading 3D models is slower with the Online version because Java threads are more efficient than JavaScript workers when there are a lot of data to retrieve (finally I even didn't use JavaScript workers). The 3D view might run faster at a given size at screen, probably because the WebGL rendering I programmed is simpler than the Java 3D / JOGL / OpenGL layers. But I also noticed that computing window holes in the walls is much slower in JavaScript and wonder if it's because JavaScript proposes only high precision decimal numbers (you can see this difference when you try to change level in the large building examples of this tip).
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
Österreich
Joined: Nov 2, 2022
Post Count: 2
Status:
Offline
Re: Sweet Home 3D JS Online
I plan everything in the online editor but what is incredibly annoying is that the windows (walkthrough and sketch) cannot be placed in their own tabs.
Please separate these two views so that the sketch is on one screen and the rendering (virtual walkthrough of the house) on the other.
Will this feature be available in the next version?
France
Joined: Nov 7, 2005
Post Count: 9426
Status:
Offline
Re: Sweet Home 3D JS Online
Sorry, I don’t think so. You can already change their size with the separator between them.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator