i'm using the fsresource sling extension to access the filesystem when working on JSP, JS, CSS and so on. When just yanking the bundle into the crx and configuring it via the OSGi console, everything works as expected. But when i try to add a new runmode (configurtion), the result is unsatisfying.
config/src/main/content/jcr_root/apps/samples/config/org.apache.sling.fsprovider.internal.FsResourceProvider.factory.config.xml
Is the path of the main configuration, which i'm using on a local instance to figure out, how to achieve the desired results, but the best i could get was an unbound configuration displayed in the
system/console/configMgr
The contents of the XML file:
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0"
xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="sling:OsgiConfig"
provider.roots="/apps/ui-samples"
provider.file="/Volumes/samples/ui/src/main/content/jcr_root/apps/ui-samples"
provider.checkinterval="1000"/>
Apparently, the i just thought too complicated about the name of the file.
org.apache.sling.fsprovider.internal.FsResourceProvider-samples.xml
for instance does the job.
Related
I got the following error while using freeswitch switch_xml_config.c:78 Could not open curl.conf. This is very interesting, because the offical docs are saying "There is no separate config file for mod_curl.". So is this file needed, yes or no?
I also looked into the source code and found the error being thrown in the following definition, in switch_xml_config: switch_xml_config_parse_module_settings(...). This get's used in mod_curl.c:1072 in do_config(...): switch_xml_config_parse_module_settings("curl.conf", reload, instructions);.
So it looks like mod_curl would like to read a file called "curl.conf".
But as the docs say that there isn't a config file, there is also no info on what this file should contain. Does anyone have any idea what to do? Or should I just create an empty file to suppress the error?
Any hints on what is correct and what to do are appreciated.
I have a curl.conf.xml with the following:
<configuration name="curl.conf" description="cURL module">
<settings>
<param name="max-bytes" value="256000"/>
</settings>
</configuration>
It's in the github repository: https://github.com/signalwire/freeswitch/blob/master/src/mod/applications/mod_curl/conf/autoload_configs/curl.conf.xml
I'm looking for a way to customize the Web application name (so to change the Web context accordingly) in Thorntail. I assume that it can be done through the thorntail's maven plugin but I cannot find which is the property to set for it.
Thanks
By default, the context is /, which should be what you want most of the time. To customize it, you can use one of the following options:
1) Pass the thorntail.context.path system property when starting the uberjar: java -jar my-app-thorntail.jar -Dthorntail.context.path=my-context.
2) If you use project-defaults.yml, you can configure it there:
thorntail:
context:
path: my-context
3) Create a file WEB-INF/jboss-web.xml with this content:
<jboss-web>
<context-root>my-context</context-root>
</jboss-web>
(Under the hood, options 1 and 2 are actually transformed to 3, but you don't have to care.)
The essence of the problem: how to transfer your own web.xml file to
new org.apache.tomee.embedded.Configuration().setWebXml("file_name").
When I set http port as new org.apache.tomee.embedded.Configuration().setHttpPort(_port) works fine.
But, when set web.xml it does not work.
I think setWebXml is a dead config but you can setConf("/folder/in/resources") and put a web.xml in this folder. It will put it in conf folder and do what you want
How do I load ${catalina.home}/conf/application.properties in a Spring / Tomcat webapp?
Looking around on StackOverflow and Google I see many discussions which claim it's possible. However, it's just not working for me. In line with the advice from my research my Spring applicationContext.xml file contains the following line:
<context:property-placeholder location="${catalina.home}/conf/application.properties"/>
But I get this in the logs:
Caused by: java.io.FileNotFoundException: Could not open ServletContext resource [/Users/username/Servers/apache-tomcat-6.0.36/conf/application.properties]
From the log entry I can see that ${catalina.home} is expanding correctly. When I expand it by hand in the applicationContext.xml file it returns the same error. The following returns the contents of the application.properties file as expected:
cat /Users/username/Servers/apache-tomcat-6.0.36/conf/application.properties
So the path is clearly correct. Is this a webapp security or Tomcat server configuration issue?
The location of a context:property-placeholder is a Resource, which means that if you provide just a file path (as opposed to a full URL with a protocol) then the path will be resolved against the base directory of the webapp - it is trying to load /Users/username/Servers/apache-tomcat-6.0.36/webapps/<appname>/Users/username/Servers/apache-tomcat-6.0.36/conf/application.properties, which does not exist. If you prefix it with file: it'll work as you require:
<context:property-placeholder location="file:${catalina.home}/conf/application.properties"/>
For annotation based configuration you can use:
#PropertySource("file:${catalina.home}/conf/application.properties")
I'm trying to upload my hand-coded template to Joomla 2.5.
I have moved it to the templates folder online. Now I'm trying to INSTALL it from Extension Manager > Install (I see the path to it in the textbox against the Install button). But upon clicking the button, I get this error:
-1 - An error has occurred.
Copy failed
Here's my XML file:
<?xml version="1.0" encoding="utf-8"?>
<extension version="2.5" type="template">
<name>Travels</name>
<description>
Template for Target Travels
</description>
<files>
<filename>index.php</filename>
<filename>catergory.php</filename>
<filename>templateDetails.xml</filename>
<filename>css/template.css</filename>
<filename>css/mystyle.css</filename>
<filename>css/common.css</filename>
<filename>css/crasel.css</filename>
<filename>css/jquery.jcarousel.css</filename>
<filename>css/skin.css</filename>
<folder>css</folder>
<folder>images</folder>
</files>
<positions>
<position>breadcrumb</position>
<position>welcome</position>
<position>tour_catergory</position>
<position>left</position>
<position>right</position>
<position>top</position>
<position>user1</position>
<position>user4</position>
<position>footer</position>
</positions>
</extension>
Any idea on the cause and how to fix it?
This is usually due to permission issues with folders. In the Joomla backend go to:
Site (top menu) >> System Information >> Directory Permissions and ensure the "templates" folder is writable. Whilst you're at it, ensure all folder and files in the list are writable.
Hope this helps
If your template is already in place you should use discover install not install from directory. You have no need to copy files if the files are already where they need to be.