Skip to content

Commit

Permalink
working example of resourcehandler inside of module
Browse files Browse the repository at this point in the history
  • Loading branch information
thmarx committed Nov 4, 2023
1 parent 9158a51 commit a452a99
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public Mapping getHandler() {
// ResourceFactory.of(resourceHandler)
// .newClassLoaderResource("com/github/thmarx/cms/modules/ui/assets/", false)
// );
URL resource = UIJettyHttpHandlerExtension.class.getResource("/com/github/thmarx/cms/modules/ui/assets");
URL resource = UIJettyHttpHandlerExtension.class.getResource("/files");
var fileURI = resource.toURI().toString().replace("jar:", "");
resourceHandler.setBaseResource(ResourceFactory.of(resourceHandler).newJarFileResource(URI.create(fileURI)));

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!--
#%L
ui-module
%%
Copyright (C) 2023 Marx-Software
%%
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
#L%
-->
<!doctype html>
<html>
<head></head>
<body>
UI
</body>
</html>

0 comments on commit a452a99

Please sign in to comment.