Download

Online

Gallery

Blog

  Index  | Recent Threads  | List Attachments  | Search
 Welcome Guest  |  Register  |  Login
Login Name  Password
 

Sweet Home 3D Forum



No member browsing this thread
Thread Status: Active
Total posts in this thread: 10
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 13881 times and has 9 replies Next Thread
bluesky5566
Newbie




Joined: Jul 28, 2010
Post Count: 7
Status: Offline
Reply to this Post  Reply with Quote 
who has SweetHome3D online source?

I think sweetHome3d run in my tomcat,and put in my web project,but,i don't know online save and read,please help me !
[Aug 2, 2010, 7:51:48 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9178
Status: Offline
Reply to this Post  Reply with Quote 
Re: who has SweetHome3D online source?

Save and read operation depends on how you want to organize user information your server. A default implementation is proposed in source code in PHP.
For more information please read also these subjects:
http://www.sweethome3d.com/support/forum/viewthread_thread,1454
http://www.sweethome3d.com/support/forum/viewthread_thread,1435
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Aug 3, 2010, 11:03:42 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
bluesky5566
Newbie




Joined: Jul 28, 2010
Post Count: 7
Status: Offline
Reply to this Post  Reply with Quote 
Re: who has SweetHome3D online source?

thanks a lot,but I can't develop JSP likes PHP,please help me.this is my code.

<%@ page import="org.apache.commons.fileupload.*" pageEncoding="UTF-8"%>
<%@ page import="org.apache.commons.fileupload.servlet.*" %>
<%@ page import="com.scand.fileupload.*" %>
<%@ page import="java.io.*" %>
<%@ page import="java.util.*,java.sql.*" %>
<%

String uploadFolder = request.getRealPath("/"+"\\upload");

// Check that we have a file upload request
boolean isMultipart = FileUpload.isMultipartContent(request);

if (!isMultipart) {

out.println ("Use multipart form to upload a file!");

} else {

String fileId = request.getSession().getId().toString();


//创建数据工厂
FileItemFactory factory = new ProgressMonitorFileItemFactory(request, fileId);
ServletFileUpload upload = new ServletFileUpload(factory);

//从请求对象中获得要上传对象
List /* FileItem */ items = upload.parseRequest(request);
String sql = "insert into house_photos (house_id,photo_name) values(?,?)";

//迭代所有上传的FileItem
Iterator iter = items.iterator();
while (iter.hasNext()) {
FileItem item = (FileItem) iter.next();

if (item.isFormField()) {
//如果是表单对象再此处处理
} else {
//处理上传文件
String fileName = item.getName();
int i2 = fileName.lastIndexOf("\\");
if(i2>-1) fileName = fileName.substring(i2+1);
File dirs = new File(uploadFolder);
if(!dirs.exists()){
dirs.mkdir();

}

//dirs.mkdirs();
long l = System.currentTimeMillis();
// String houzhui = fileName.substring(fileName.lastIndexOf("."));

fileName = fileName+l+".sh3d";
if(true){
File uploadedFile = new File(dirs,fileName);
item.write(uploadedFile);
session.setAttribute("FileUpload.Progress."+fileId,"-1");
out.write(1);
System.out.print("1");
out.clear();

}else{
session.setAttribute("FileUpload.Progress."+fileId,"-2");
}

}
}

}
%>

,but it also prompt "can't save home in 'myhome'"!!1
[Sep 6, 2010, 7:03:36 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9178
Status: Offline
Reply to this Post  Reply with Quote 
Re: who has SweetHome3D online source?

out.clear();

should be before:

out.write(1);

shouldn't it?

Please insert your code between [ code] [ /code] tags.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Sep 8, 2010, 7:14:23 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
nicoloconte
Newbie




Joined: Sep 22, 2010
Post Count: 2
Status: Offline
Reply to this Post  Reply with Quote 
Re: who has SweetHome3D online source?

Save and read operation depends on how you want to organize user information your server. A default implementation is proposed in source code in PHP.
For more information please read also these subjects:
http://www.sweethome3d.com/support/forum/viewthread_thread,1454
http://www.sweethome3d.com/support/forum/viewthread_thread,1435


Hi all, I'm trying to embed SH3D in my Drupal site but I have several problems with the saving and reading functionality. I downloaded listHomes.php and both readHOme.php and writeHome.php but I can't make them work. When I click on the "open" icon the input window show me the source of the listHomes.php file.

Where am I doing wrong?

Thank you very much.
[Sep 30, 2010, 5:00:29 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9178
Status: Offline
Reply to this Post  Reply with Quote 
Re: who has SweetHome3D online source?

If I were you, I would learn basics about server scripts and PHP before even trying to deploy these PHP files...
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Sep 30, 2010, 5:12:22 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
nicoloconte
Newbie




Joined: Sep 22, 2010
Post Count: 2
Status: Offline
Reply to this Post  Reply with Quote 
Re: who has SweetHome3D online source?

I know PHP and Java well, but I need some documentation. Can you help me?
[Sep 30, 2010, 5:33:08 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9178
Status: Offline
Reply to this Post  Reply with Quote 
Re: who has SweetHome3D online source?

More and more people ask for help about deploying an online version without even presenting themselves and/or explaining what they want it for.
So yes, I can help but if this deployment is for commercial purpose, don't expect it will be for free.
I guess you'll understand that voluntary work can have some limits...
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Sep 30, 2010, 6:33:23 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
PixelStudios
Newbie




Joined: May 24, 2011
Post Count: 1
Status: Offline
Reply to this Post  Reply with Quote 
Re: who has SweetHome3D online source?

Hi Puybaret

I need to deploy an online version for commercial purpose. Please help us how to further?

Regards
Rajesh
Pixel Studios
[Jun 13, 2011, 8:36:36 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9178
Status: Offline
Reply to this Post  Reply with Quote 
Re: who has SweetHome3D online source?

What do you miss in the previous links?
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Jun 13, 2011, 10:28:24 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
[ Jump to Last Post ]
Show Printable Version of Thread  Post new Thread

    Get Sweet Home 3D at SourceForge.net. Fast, secure and Free Open Source software downloads
   
© Copyright 2006-2024 eTeks - All rights reserved