portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bonbon Lin (JIRA)" <jetspeed-...@portals.apache.org>
Subject [jira] Created: (JS2-898) PSML can not import
Date Wed, 20 Aug 2008 02:52:44 GMT
PSML can not import
-------------------

                 Key: JS2-898
                 URL: https://issues.apache.org/jira/browse/JS2-898
             Project: Jetspeed 2
          Issue Type: Bug
          Components: Admin Portlets
    Affects Versions: 2.1.3
         Environment: Tomcat 5.5, JDK1.5, Windows Vista
            Reporter: Bonbon Lin


in admin portlet: Portal Site Manager.
can not use import function to import a PSML file,
the upload process always get the full path of client of uploaded file to be the store file
path,
the file name of the upload file for storing always become to the name like as c:\apache\j2\temp\d:\my-folder\my-page.psml

in class org.apache.jetspeed.portlets.site.PortalSiteManager, 
from line 231 to line 246
                    while (fileIt.hasNext()) {
                        FileItem fileItem = (FileItem) fileIt.next();
                        if (fileItem.getFieldName().equals("psmlFile")) {
                            synchronized (this) {
                                fileName = fileItem.getName();
                                usrFolder = getTempFolder(request);
                                path= System.getProperty("file.separator");
                                String filePath = usrFolder + path + fileItem.getName();
                                FileOutputStream out = new FileOutputStream(filePath);
                                out.write(fileItem.get());
                                out.close();
                            }
                        }else if(fileItem.isFormField() && fileItem.getFieldName().equalsIgnoreCase("importPath")){
                            destPath= fileItem.getString();
                        }  
                    }

get file name by fileItem.getName(), got a String with the full path from client


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message