{"id":15637062,"url":"https://github.com/bluejoe2008/elfinder-2.x-servlet","last_synced_at":"2025-07-21T11:06:12.380Z","repository":{"id":10247240,"uuid":"12353487","full_name":"bluejoe2008/elfinder-2.x-servlet","owner":"bluejoe2008","description":"elfinder-2.x-servlet implements a java servlet for elfinder-2.x connector, elfinder is an Open-source file manager for web","archived":false,"fork":false,"pushed_at":"2022-12-16T02:01:14.000Z","size":12574,"stargazers_count":112,"open_issues_count":22,"forks_count":80,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-05-20T14:04:22.819Z","etag":null,"topics":["commandexecutor","elfinder","elfinder-servlet","file-explorer","web-ui"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bluejoe2008.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":"https://bluejoe2008.github.io/open-source-sponser.png"}},"created_at":"2013-08-25T03:16:10.000Z","updated_at":"2025-04-18T09:04:55.000Z","dependencies_parsed_at":"2023-01-13T15:49:52.135Z","dependency_job_id":null,"html_url":"https://github.com/bluejoe2008/elfinder-2.x-servlet","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/bluejoe2008/elfinder-2.x-servlet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluejoe2008%2Felfinder-2.x-servlet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluejoe2008%2Felfinder-2.x-servlet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluejoe2008%2Felfinder-2.x-servlet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluejoe2008%2Felfinder-2.x-servlet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bluejoe2008","download_url":"https://codeload.github.com/bluejoe2008/elfinder-2.x-servlet/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluejoe2008%2Felfinder-2.x-servlet/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266287824,"owners_count":23905461,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["commandexecutor","elfinder","elfinder-servlet","file-explorer","web-ui"],"created_at":"2024-10-03T11:09:46.373Z","updated_at":"2025-07-21T11:06:12.351Z","avatar_url":"https://github.com/bluejoe2008.png","language":"Java","funding_links":["https://bluejoe2008.github.io/open-source-sponser.png"],"categories":[],"sub_categories":[],"readme":"what's elfinder-2.x-servlet\n====================\n\n[![GitHub issues](https://img.shields.io/github/issues/bluejoe2008/elfinder-2.x-servlet.svg)](https://github.com/bluejoe2008/elfinder-2.x-servlet/issues)\n[![GitHub forks](https://img.shields.io/github/forks/bluejoe2008/elfinder-2.x-servlet.svg)](https://github.com/bluejoe2008/elfinder-2.x-servlet/network)\n[![GitHub stars](https://img.shields.io/github/stars/bluejoe2008/elfinder-2.x-servlet.svg)](https://github.com/bluejoe2008/elfinder-2.x-servlet/stargazers)\n[![GitHub license](https://img.shields.io/github/license/bluejoe2008/elfinder-2.x-servlet.svg)](https://github.com/bluejoe2008/elfinder-2.x-servlet/blob/master/LICENSE)\n\nelfinder-2.x-servlet implements a java servlet for elfinder-2.x connector\n\nelfinder is an Open-source file manager for web, written in JavaScript using jQuery and jQuery UI.\nsee also http://elfinder.org\n\n\u003cimg src=\"https://github.com/bluejoe2008/elfinder-2.x-servlet/blob/0.9/23205811_gr0b.png?raw=true\" width=500\u003e\n\n\u003cimg src=\"https://github.com/bluejoe2008/elfinder-2.x-servlet/blob/0.9/23205833_rxSV.png?raw=true\" width=500\u003e\n\nfor elfinder-1.2 users, please go to https://github.com/Studio-42/elfinder-servlet.\n\nimporting elfinder-2.x-servlet\n====================\nthis project is released as an artifact on the central repostory\n\nuse\n\n    \u003cdependency\u003e\n        \u003cgroupId\u003eorg.grapheco\u003c/groupId\u003e\n        \u003cartifactId\u003eelfinder-servlet-2\u003c/artifactId\u003e\n        \u003cversion\u003e1.4\u003c/version\u003e\n        \u003cclassifier\u003eclasses\u003c/classifier\u003e\n    \u003c/dependency\u003e\n\nto add dependency in your pom.xml\n\nbuilding elfinder-2.x-servlet\n====================\nthe source files includes:\n\n* src/main/webapp : a normal j2ee application includes elfinder, WEB-INF...\n* src/main/java: source codes for elfinder-servlet\n* src/main/resources: source codes for elfinder-servlet\n\nTo build this project with maven run:\n\n    mvn install\n\nto run this project within a jetty container use:\n\n    mvn jetty:run\n\nusing elfinder-2.x-servlet in your web apps\n====================\njust use following codes to tell elfinder to connect with server-side servlet:\n\n\t\t\u003cscript type=\"text/javascript\" charset=\"utf-8\"\u003e\n\t\t\t$(document).ready(function() {\n\t\t\t\t$('#elfinder').elfinder({\n\t\t\t\t\turl : 'elfinder-servlet/connector',\n\t\t\t\t});\n\t\t\t});\n\t\t\u003c/script\u003e\n\nin your web.xml, following codes should be added to enable the servlet:\n\n\t\u003cservlet\u003e\n\t\t\u003cservlet-name\u003eelfinder\u003c/servlet-name\u003e\n\t\t\u003cservlet-class\u003eorg.springframework.web.servlet.DispatcherServlet\n\t\t\u003c/servlet-class\u003e\n\t\u003c/servlet\u003e\n\n\t\u003cservlet-mapping\u003e\n\t\t\u003cservlet-name\u003eelfinder\u003c/servlet-name\u003e\n\t\t\u003curl-pattern\u003e/elfinder-servlet/*\u003c/url-pattern\u003e\n\t\u003c/servlet-mapping\u003e\n\nyes! elfinder-2.x-servlet is developed upon SpringFramework (http://springframework.org)\n\nan example elfinder-servlet.xml configuration is shown below:\n\n\t\u003c!-- find appropriate  command executor for given command--\u003e\n\t\u003cbean id=\"commandExecutorFactory\"\n\t\tclass=\"org.grapheco.elfinder.controller.executor.DefaultCommandExecutorFactory\"\u003e\n\t\t\u003cproperty name=\"classNamePattern\"\n\t\t\tvalue=\"org.grapheco.elfinder.controller.executors.%sCommandExecutor\" /\u003e\n\t\t\u003cproperty name=\"map\"\u003e\n\t\t\t\u003cmap\u003e\n\t\t\t\u003c!-- \n\t\t\t\t\u003centry key=\"tree\"\u003e\n\t\t\t\t\t\u003cbean class=\"org.grapheco.elfinder.controller.executors.TreeCommandExecutor\" /\u003e\n\t\t\t\t\u003c/entry\u003e\n\t\t\t--\u003e\n\t\t\t\u003c/map\u003e\n\t\t\u003c/property\u003e\n\t\u003c/bean\u003e\n\n\t\u003c!-- FsService is often retrieved from HttpRequest --\u003e\n\t\u003c!-- while a static FsService is defined here --\u003e\n\t\u003cbean id=\"fsServiceFactory\" class=\"org.grapheco.elfinder.impl.StaticFsServiceFactory\"\u003e\n\t\t\u003cproperty name=\"fsService\"\u003e\n\t\t\t\u003cbean class=\"org.grapheco.elfinder.impl.DefaultFsService\"\u003e\n\t\t\t\t\u003cproperty name=\"serviceConfig\"\u003e\n\t\t\t\t\t\u003cbean class=\"org.grapheco.elfinder.impl.DefaultFsServiceConfig\"\u003e\n\t\t\t\t\t\t\u003cproperty name=\"tmbWidth\" value=\"80\" /\u003e\n\t\t\t\t\t\u003c/bean\u003e\n\t\t\t\t\u003c/property\u003e\n\t\t\t\t\u003cproperty name=\"volumeMap\"\u003e\n\t\t\t\t\t\u003c!-- two volumes are mounted here --\u003e\n\t\t\t\t\t\u003cmap\u003e\n\t\t\t\t\t\t\u003centry key=\"A\"\u003e\n\t\t\t\t\t\t\t\u003cbean class=\"org.grapheco.elfinder.localfs.LocalFsVolume\"\u003e\n\t\t\t\t\t\t\t\t\u003cproperty name=\"name\" value=\"MyFiles\" /\u003e\n\t\t\t\t\t\t\t\t\u003cproperty name=\"rootDir\" value=\"/tmp/a\" /\u003e\n\t\t\t\t\t\t\t\u003c/bean\u003e\n\t\t\t\t\t\t\u003c/entry\u003e\n\t\t\t\t\t\t\u003centry key=\"B\"\u003e\n\t\t\t\t\t\t\t\u003cbean class=\"org.grapheco.elfinder.localfs.LocalFsVolume\"\u003e\n\t\t\t\t\t\t\t\t\u003cproperty name=\"name\" value=\"Shared\" /\u003e\n\t\t\t\t\t\t\t\t\u003cproperty name=\"rootDir\" value=\"/tmp/b\" /\u003e\n\t\t\t\t\t\t\t\u003c/bean\u003e\n\t\t\t\t\t\t\u003c/entry\u003e\n\t\t\t\t\t\u003c/map\u003e\n\t\t\t\t\u003c/property\u003e\n\t\t\t\t\u003cproperty name=\"securityChecker\"\u003e\n\t\t\t\t\t\u003cbean class=\"org.grapheco.elfinder.impl.FsSecurityCheckerChain\"\u003e\n\t\t\t\t\t\t\u003cproperty name=\"filterMappings\"\u003e\n\t\t\t\t\t\t\t\u003clist\u003e\n\t\t\t\t\t\t\t\t\u003cbean class=\"org.grapheco.elfinder.impl.FsSecurityCheckFilterMapping\"\u003e\n\t\t\t\t\t\t\t\t\t\u003cproperty name=\"pattern\" value=\"A_.*\" /\u003e\n\t\t\t\t\t\t\t\t\t\u003cproperty name=\"checker\"\u003e\n\t\t\t\t\t\t\t\t\t\t\u003cbean class=\"org.grapheco.elfinder.impl.FsSecurityCheckForAll\"\u003e\n\t\t\t\t\t\t\t\t\t\t\t\u003cproperty name=\"readable\" value=\"true\" /\u003e\n\t\t\t\t\t\t\t\t\t\t\t\u003cproperty name=\"writable\" value=\"true\" /\u003e\n\t\t\t\t\t\t\t\t\t\t\u003c/bean\u003e\n\t\t\t\t\t\t\t\t\t\u003c/property\u003e\n\t\t\t\t\t\t\t\t\u003c/bean\u003e\n\t\t\t\t\t\t\t\t\u003cbean class=\"org.grapheco.elfinder.impl.FsSecurityCheckFilterMapping\"\u003e\n\t\t\t\t\t\t\t\t\t\u003cproperty name=\"pattern\" value=\"B_.*\" /\u003e\n\t\t\t\t\t\t\t\t\t\u003cproperty name=\"checker\"\u003e\n\t\t\t\t\t\t\t\t\t\t\u003cbean class=\"org.grapheco.elfinder.impl.FsSecurityCheckForAll\"\u003e\n\t\t\t\t\t\t\t\t\t\t\t\u003cproperty name=\"readable\" value=\"true\" /\u003e\n\t\t\t\t\t\t\t\t\t\t\t\u003cproperty name=\"writable\" value=\"false\" /\u003e\n\t\t\t\t\t\t\t\t\t\t\u003c/bean\u003e\n\t\t\t\t\t\t\t\t\t\u003c/property\u003e\n\t\t\t\t\t\t\t\t\u003c/bean\u003e\n\t\t\t\t\t\t\t\u003c/list\u003e\n\t\t\t\t\t\t\u003c/property\u003e\n\t\t\t\t\t\u003c/bean\u003e\n\t\t\t\t\u003c/property\u003e\n\t\t\t\u003c/bean\u003e\n\t\t\u003c/property\u003e\n\t\u003c/bean\u003e\n\nA ConnectorServlet is provided for people who do not use spring framework:\n\n\t\u003cservlet\u003e\n\t\t\u003cservlet-name\u003eelfinder-connector-servlet\u003c/servlet-name\u003e\n\t\t\u003cservlet-class\u003eorg.grapheco.elfinder.servlet.ConnectorServlet\n\t\t\u003c/servlet-class\u003e\n\t\u003c/servlet\u003e\n\t\u003cservlet-mapping\u003e\n\t\t\u003cservlet-name\u003eelfinder-connector-servlet\u003c/servlet-name\u003e\n\t\t\u003curl-pattern\u003e/elfinder-servlet/connector\u003c/url-pattern\u003e\n\t\u003c/servlet-mapping\u003e\n\nIf you want to customize behavior of ConnectorServlet(see https://github.com/bluejoe2008/elfinder-2.x-servlet/blob/0.9/src/main/java/cn/bluejoe/elfinder/servlet/ConnectorServlet.java), you may need to create a derivided servlet class based on ConnectorServlet.\n\nfeatures\n================\n* __easy to use__: just define a servlet in your web.xml, or configure the XML file in spring IOC format, and then start your web application\n* __easy to import__: an artifact on the central repostory is provided, use maven to manage the dependency\n* __logic file views__: a local file system is not necessary, you can define your FsService\n* __easy to personalize__: different file views are allowed for different users, just provide a custom FsServiceFactory\n* __easy to modify and extend__: provide your own CommandExecutors to respond new commands\n\nCommand, CommandExecutor, CommandExecutorManager\n================\n\nelfinder-2.x-servlet implements file management commands including:\n\n*  DIM\n*  DUPLICATE\n*  FILE\n*  GET\n*  LS\n*  MKDIR\n*  MKFILE\n*  OPEN\n*  PARENT\n*  PASTE\n*  PUT\n*  RENAME\n*  RM\n*  SEARCH\n*  SIZE\n*  TMB\n*  TREE\n*  UPLOAD(CHUNK supported!!!)\n\nEach command corresponds to a CommandExecutor class, for example, the TREE command is implemented by the class TreeCommandExecutor(see https://github.com/bluejoe2008/elfinder-2.x-servlet/src/main/java/cn/bluejoe/elfinder/controller/executors/TreeCommandExecutor.java). Users can modify existing class or entend new executor class by following this naming rule.\n\nFurthermore, this rule can even be modified via setting the commandExecutorFactory in elfinder-servlet.xml, in which default factory is DefaultCommandExecutorFactory(see https://github.com/bluejoe2008/elfinder-2.x-servlet/src/main/java/cn/bluejoe/elfinder/controller/executor/DefaultCommandExecutorFactory.java). A CommandExecutorFactory tells how to locate the command executor(TreeCommandExecutor as an example) by a given command name(\"TREE\" as an example), it is designed as an interface:\n\n\tpublic interface CommandExecutorFactory\n\t{\n\t\tCommandExecutor get(String commandName);\n\t}\n\n\nFsItem, FsVolume, FsService, FsServiceFactory\n================\nEach file is represented as a FsItem. And the root of a file is represented as a FsVolume. A FsVolume tells parent-children relations between all FsItems and implements all file operation (for example, create/delete).\n\nA FsService may have many FsVolumes. Users can create a FsService via a FsServiceFactory:\n\n\tpublic interface FsServiceFactory\n\t{\n\t\tFsService getFileService(HttpServletRequest request, ServletContext servletContext);\n\t}\n\nA simple (and stupid) StaticFsServiceFactory is provided in https://github.com/bluejoe2008/elfinder-2.x-servlet/src/main/java/cn/bluejoe/elfinder/impl/StaticFsServiceFactory.java, which always returns a fixed FsService, despite of whatever it is requested. However, sometimes a FsService should be constructed dynamically according to current Web request. For example, users may own separated file spaces in a network disk service platform, in this case, getFileService() get user principal from current request and offers him/her different file view.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluejoe2008%2Felfinder-2.x-servlet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbluejoe2008%2Felfinder-2.x-servlet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluejoe2008%2Felfinder-2.x-servlet/lists"}