I have a Glassfish server working on windows and a problem with alternatedocroot. When I use this
<property name="alternatedocroot_1" value="from=/images/9075.png dir=C:\member\"/>
and request server:8080/myapp/images/9075.png the correct file is displayed. However the directory is full of images so I have tried all of these at different times
<property name="alternatedocroot_1" value="from=/images/\*.png dir=C:\member\"/>
<property name="alternatedocroot_1" value="from=/images/*.png dir=C:\member\"/>
<property name="alternatedocroot_1" value="from=/images/\* dir=C:\member\"/>
<property name="alternatedocroot_1" value="from=/images/* dir=C:\member\"/>
but the same request (server:8080/myapp/images/9075.png) produces a 404 error. I am sure I am making a silly error but I can't see it. I hope someone can help.
Did you try this?
<property name="alternatedocroot_1" value="from=/images/* dir=C:\\member\\"/>
This may have to do with windows back-slashes requires escaping.
Related
I am trying to read HTTP header from inside an API that I defined in the ESB. I have tried various methods (see below) all of them print out "null" in the logs.
<log level="custom">
<property name="LOG-POSITION___________________________" value="...4"/>
<property name="AXIS2___________________________" expression="$axis2:accept"/>
<property name="AXIS2___________________________" expression="$axis2:Accept"/>
<property name="AXIS2___________________________" expression="$axis2:ACCEPT"/>
<property name="CTX___________________________" expression="$ctx:accept"/>
<property name="CTX___________________________" expression="$ctx:Accept"/>
<property name="CTX___________________________" expression="$ctx:ACCEPT"/>
<property name="TRP___________________________" expression="$trp:accept"/>
<property name="TRP___________________________" expression="$trp:Accept"/>
<property name="TRP___________________________" expression="$trp:ACCEPT"/>
</log>
I can't see why it is not working.
Here is the synapse code to read and log the content-type http header. Here $trp stands for the transport header.
<log level="custom">
<property name="Content_Type" expression="$trp:Content-Type"/>
</log>
Ref: https://docs.wso2.com/display/ESB500/Synapse+XPath+Variables
If it doesn't work, enable wire logs and post the logs in the question.
I have found an answer to this by looking through existing code, and doing a bit of trial and error.
The expression "$trp:Accept" works, but it must be used before using either a call or send mediator.
For any others experiencing this issue, move the property mediator for grabbing this to the beginning of your proxy or api and the values should come through.
I want to do a whitelisting of what properties are indexed/searched and shown in excerpt with a Magnolia search.
I am changing the indexing_configuration.xml in my website workspace.
Removing the index and restarting magnolia did not change anything...
By now I have this in my indexing_configuration.xml (next to other stuff)
but these are the String properties I want to include in my ecxcerpt the rest should be excluded:
<index-rule nodeType="nt:hierarchyNode">
<property boost="10" useInExcerpt="true">introTitle</property>
<property boost="1.0" useInExcerpt="true">introAbstract</property>
<property boost="1.0" useInExcerpt="true">contentText</property>
<property boost="1.0" useInExcerpt="true">subText</property>
<property boost="10" useInExcerpt="true">title</property>
<!-- exclude jcr:* and mgnl:* properties -->
<property isRegexp="true" nodeScopeIndex="false" useInExcerpt="false">.*:.*</property>
</index-rule>
<index-rule nodeType="mgnl:contentNode">
<property boost="5" nodeScopeIndex="false" useInExcerpt="true">introTitle</property>
<property boost="2" nodeScopeIndex="false" useInExcerpt="true">introAbstract</property>
<property boost="2" nodeScopeIndex="false" useInExcerpt="true">contentText</property>
<property boost="2" nodeScopeIndex="false" useInExcerpt="true">subText</property>
<property boost="5" nodeScopeIndex="false" useInExcerpt="true">title</property>
<!-- exclude jcr:* and mgnl:* properties -->
<property isRegexp="true" nodeScopeIndex="false" useInExcerpt="false">.*:.*</property>
</index-rule>
How can i get this to work as intended? Thanks for your help..
Most likely cause is that Magnolia/JR is not seeing your new configuration. Did you change your repo configuration (workspace.xml in website workspace) to point it to new index configuration?
Default looks like:
<SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
<param name="path" value="${wsp.home}/index" />
<!-- SearchIndex will get the indexing configuration from the classpath, if not found in the workspace home -->
<param name="indexingConfiguration" value="/info/magnolia/jackrabbit/indexing_configuration.xml"/>
and you need to point it to your new file.
Also not sure why you are setting indexing based on nt:hierarchyNode or mgnl:contentNode rather then using more specific mgnl:page/mgnl:component
This is my first steps with Restcomm,
I got install the restcomm (jboss version), on the first time I got to hear the welcome message, and I got to access to the admin page.
Then, I tried to restart the jboss, I saw some errors. And I tried to change the dabase in the ibatis.conf from hsql to postgresql.
My question is:
If is possible to change the database (users,roles and rules) and where I can find the instructions for do this.
And I have another question
<dataSource type="POOLED">
<property name="driver" value="org.hsqldb.jdbcDriver"/>
<property name="url" value="jdbc:hsqldb:file://${data}/restcomm;ifexists=true;hsqldb.write_delay=false;shutdown=true"/>
<property name="username" value="sa"/>
<property name="password" value=""/>
</dataSource>
Where the restcomm save the data of the hsql, because I deleted all, install again and then my problem continues.
The following link shows how to configure a different database on Restcomm (MariaDB).
http://docs.telestax.com/restcomm-install-and-configure-restcomm-to-use-mariadb/
You will also need the driver to configure the PostgreSQL DB.
I changed the discovery.xml file as described in the documentation to add a new facet over dc.type to our DSpace. When I finished reindexing and deleting the cache I see the new search filter at advanced search but not as a facet.
These are the changes I made to discovery.xml:
Added filter to sidbarFacets and SearchFilter:
<ref bean="searchFilterType" />
and this is the filter:
<bean id="searchFilterType" class="org.dspace.discovery.configuration.DiscoverySearchFilterFacet">
<property name="indexFieldName" value="type"/>
<property name="metadataFields">
<list>
<value>dc.type</value>
</list>
</property>
</bean>
Thanks in advance
The following modifications to discovery.xml on the latest DSpace master branch worked on my local setup:
https://github.com/bram-atmire/DSpace/commit/3f084569cf1bbc6c6684d114a09a1617c8d3de5d
One reason why the facet wouldn't appear in your setup, could be that you omitted to add it to both the "defaultconfiguration" as well as the specific configuration for the DSpace homepage.
After building and deploying, a forced discovery re-index using the following command made the facet appear:
./dspace index-discovery -f
Here is an example facet that I have configured in our instance. Try setting the facetLimit, sortOrder, and splitter. Re-index and see if that resolves the issue.
<bean id="searchFilterGeographic"
class="org.dspace.discovery.configuration.HierarchicalSidebarFacetConfiguration">
<property name="indexFieldName" value="geographic-region"/>
<property name="metadataFields">
<list>
<value>dc.coverage.spatial</value>
</list>
</property>
<property name="facetLimit" value="5"/>
<property name="sortOrder" value="COUNT"/>
<property name="splitter" value="::"/>
</bean>
I'm switching to VelocityTools 2.0 but the new tools.xml doesn't load. I replaced toolbox.xml and now I use tools.xml but when I run the server I get:
"XMLToolboxManager:100: XMLToolboxManager has been deprecated. Please
use org.apache.velocity.tools.ToolboxFactory instead.
ServletToolboxManager:131: ServletToolboxManager has been deprecated.
Please use org.apache.velocity.tools.ToolboxFactory instead."
How can I use the ToolboxFactory? XMLToolboxManager or ServletToolboxManager are not referenced anywhere in my code so I can't simply replace the classes.
When I use toolbox.xml with VelocityTools 2.0 it works just fine, but I need to get the new xml syntax work in tools.xml
My bean definition in velocity.xml looks like this:
<bean id="viewResolver" class="org.springframework.web.servlet.view.velocity.VelocityLayoutViewResolver">
<property name="viewClass">
<value>org.springframework.web.servlet.view.velocity.VelocityLayoutView</value>
</property>
<property name="contentType">
<value>text/html;charset=UTF-8</value>
</property>
<property name="cache"><value>true</value></property>
<property name="prefix"><value></value></property>
<property name="suffix"><value>.vm</value></property>
<property name="toolboxConfigLocation"><value>/WEB-INF/tools.xml</value></property>
</bean>
I tried removing the property for "toolboxConfigLocation" from the bean and hoped that the default tools.xml will be available, but when I tried to use i.e $math didn't work. What am I doing wrong?
Can someone help please?