CKEditor images getting lost when war undeployed from OpenLiberty

asked 2021-05-10 16:02:27 +0800

dgrenier gravatar image dgrenier


I lost uploaded images when war undeployed from OpenLiberty.

It is possible to upload images outside webapp ? For example, in shared ressources under OpenLiberty.

ZK, CKEditor


delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted

answered 2021-05-12 12:18:40 +0800

hawk gravatar image hawk
2837 1 5
http://hawkphoenix.blogsp... ZK Team

updated 2021-05-13 09:29:57 +0800

By default, it only uploads to a folder inside a web application because a web application can only access the folders under its web context root. When you undeploy a web application, it's expected that the server will remove all its subfolder including your image uploading folder.

To store the uploaded images to a folder out of web context root, you need to implement your own org.zkforge.ckez.CkezFileWriter and assign it by

((CKeditor)comp).setFileWriter(new MyCkezFileWriter("/mydisk/upload"));

Then you might also need a custom image browser template because you need to browse a folder out of web context root. You can reference the default one below to write your own:


And specify your template path:

<ckeditor fileBrowserTemplate="fileBrowser.zul"/>

You also need a servlet to handle the image URL after inserting an image.

If you need dedicated support, please contact [email protected]

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools




Asked: 2021-05-10 16:02:27 +0800

Seen: 6 times

Last updated: May 13

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More