Hi Asiri,
Thanks a lot for continuing help. I read your messages this morning and I
tested it.
I tested as you said
File name is: $fileName
And I obtained :
"File name is: D:\Users\bet\Desktop\test.doc"
So it's seem alright
I deleted the file in Jetty and I inserted the two lines :
#set($tempIndex = $fileName.lastIndexOf('/') + 1)
#set($fileName=$fileName.substring($tempIndex))
Same result ? :
"File name is: D:\Users\bet\Desktop\test.doc"
The creation doesn't work (same message "Error while converting document
[D:\Users\bet\Desktop\test.doc] into html.")
In xwiki.log, I have this
Caused by: org.xwiki.officeimporter.openoffice.OpenOfficeConverterException:
Error while performing conversion.
at
org.xwiki.officeimporter.internal.openoffice.DefaultOpenOfficeConverter.convert(DefaultOpenOfficeConverter.java:119)
at
org.xwiki.officeimporter.internal.builder.DefaultXHTMLOfficeDocumentBuilder.build(DefaultXHTMLOfficeDocumentBuilder.java:87)
... 115 more
Caused by: java.io.FileNotFoundException: C:\Program Files
(x86)\XWiki\jetty\work\Jetty_0_0_0_0_8080_xwiki__xwiki__5alevh\9831763c-5f81-4242-b113-9b5a7a2b4954\input\D:\Users\xab\Desktop\test.doc
(La syntaxe du nom de fichier, de répertoire ou de volume est incorrecte)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at
org.xwiki.officeimporter.internal.openoffice.DefaultOpenOfficeConverter.convert(DefaultOpenOfficeConverter.java:95)
Asiri Rathnayake wrote:
>
> Hi Ben,
>
>
> For the following code, I didn't understand where I can test it... I would
>> like to solve this problem with IE...
>>
>
> Since you did not respond to my last email, I'll blindly propose a
> solution
> that might fix the problem you are experiencing on IE.
>
> 1. Open up XWiki/OfficeImporterResults wiki page and go to wiki editing
> mode, you should see the following code snippet at the top of the page:
>
>
>> <code>
>> #set($fileUpload=$xwiki.fileupload)
>> #set($fileName=$fileUpload.getFileName("filePath"))
>> #if(! $fileName)
>> {{error}}$msg.get("xe.officeimporter.results.missingfile",
>> [$goBack]){{/error}}
>> #else
>> #set($void=$fileUpload.loadFileList())
>> #set($officeFileStream=$fileUpload.fileItems.get(0).inputStream)
>> #end
>> </code>
>>
>
> Now you need add two code lines (wait for it) just under the line:
>
> #set($fileName=$fileUpload.getFileName("filePath"))
>
> New code lines to be added are:
>
> #set($tempIndex = $fileName.lastIndexOf('/') + 1)
> #set($fileName=$fileName.substring($tempIndex))
>
> So, at the end your code snippet should look like:
>
> #set($fileUpload=$xwiki.fileupload)
> #set($fileName=$fileUpload.getFileName("filePath"))
> #set($tempIndex = $fileName.lastIndexOf('/') + 1)
> #set($fileName=$fileName.substring($tempIndex))
> #if(! $fileName)
> {{error}}$msg.get("xe.officeimporter.results.missingfile",
> [$goBack]){{/error}}
> #else
> #set($void=$fileUpload.loadFileList())
> #set($officeFileStream=$fileUpload.fileItems.get(0).inputStream)
> #end
>
>
> I'm not 100% sure if this will solve the problem (since I did not get a
> response for my last email). If above code fixes your problem, please let
> us
> know.
>
> Thanks.
>
> - Asiri
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/users
>
>
--
View this message in context:
http://xwiki.475771.n2.nabble.com/Configuring-Open-Office-server-tp5018359p5029544.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users