I want to remove some of the configuration from the Alfresco Share web.xml. That file lives at $TOMCAT_HOME/webapps/share/WEB-INF/web.xml so I added the customized file to $AMP_FOLDER/_share/config/META-INF/WEB-INF/web.xml. The WEB-INF folder lives at the same level as other customizations - compentents and css - which get mapped to the share.war correctly. The web.xml file appears to just get ignored though (find $TOMCAT_HOME/webapps/share -name web.xml only finds the old version of the file).
How do I tell the amp file where to put the web.xml file?
All the documentation I have found says to not override the web.xml file, but I need to remove some of the filters that are being applied.
Use -force parameter when running the apply amps and don't put your web.xml in WEB-INF because mmt ignores that.
Use for example in the file-mapping.properties:
/web/WEB-INF=/WEB-INF
and
java -jar alfresco-mmt.jar install <AMPFileLocation> <WARFileLocation> -force
Related
How to add directory to a classpath ? I am trying to register IGLOBAL Extension in spock.
Not sure about the below step what exactly I should be doing:
Extensions are not discovered automatically, you must create a special org.spockframework.runtime.extension.IGlobalExtension file under META-INF/services directory on the CLASSPATH (of course it can be in a different JAR). The content of that file is simply a fully qualified name of the extension class
I am not sure how to add the file on the classpath
Hi I am deploying my spring application to Openshift Jboss AS. The problem is whereever i placed the log4j.properties it is not read by the application. I've tried the following ways to achieve this but can't.
Placed my log4j.properties in WEB-INF/classes.
Placed my log4j.properties in WEB-ING/resources and in web.xml loaded the
context-param for log4jConfigLocation.
Created a
jboss-deployment-structure.xml in META-INF which excludes log4j
logging.
Nothing seems to work . Can some one please help me.
In Jboss there is a default logging available, which can be implemented by modifying standaole.xml.
In Openshift when you ssh into your app using the below command
rhc ssh <app-name>
You will taken into your application where when you give ls command you will see the list of files and folders, you can find jbossas folder change your working directory to that folder
cd jbossas
execute ls command you will see list of folders where you will find standalone folder, change your working directory to this folder
cd standalone
again execute ls command you can see configuration folder, change your working directory to this
cd configuration
now if you execute ls command you can see standalone.xml, we need to edit this file, but editing here may not work because this standalone.xml is a copy of the another file which is in the following folder .openshift/config/standalone.xml . You can find this folder where you clone your git copy, Not in eclipse go to your working directory in window.
We need to edit this file and add our logging properties here. thats how it works
I'm working on a spring-mvc project and was wondering if, like grails, I can create an external configuration file in tomcat with the appconfig folder. My project lives in /var/lib/tomcat7/webapps/<app> and was wondering if placing a configuration file in /var/lib/tomcat7/appconfigs/<config.xml> would work? If so, is it like grails and the application searches that location by default, or do I need to specify where that configuration lives? Thanks
What do you mean by "external configuration file"? Would this config file be separate from the war file? Or would it be packaged along with war file?
If packaged along with war file, you can put it under src/main/resources folder and it should be automatically packaged and placed in classpath.
If not packaged with war file, I usually put the configuration parameters under Tomcat's context.xml. Here's the documentation: http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Environment_Entries
In the manifest file for an eclipse plugin its possible to add jar files and
folders to the classpath (on the Runtime tab).
In the root of my plugin I have a folder lib containing a-1.0.1.jar, b-1.0.0-SNAPSHOT.jar. But only when I select each jar separately:
Bundle-ClassPath: .,
lib/a-1.0.1.jar,
lib/b-1.0.0-SNAPSHOT.jar
...can they be used inside my project. Why is it not possible to add them to the classpath by adding the common root folder only:
Bundle-ClassPath: .,
lib/
?
No, you can't. Eclipse is based on OSGi, which is the platform providing MANIFEST.MF support to build plugins.
When you set values under Bundle-ClassPath, OSGi search into each one to find class files. So you can put folders containing Java packages and class files. When you put a jar file, it is uncompressed in memory and viewed by OSGi as a regular folder, still searching for class files.
Unfortunately, there is no way to load all jar from a folder. No wildcard mechanism or something like that is allowed here.
I have created a composite component in JSF2. I works great.
I would like to create it as JAR for future use.
I followed the instructions here.
However, when it comes to CSS the browser refers to the location relatively to the project that uses the jar and not to the Jar location!
I defined it like this:
<h:outputStylesheet library="css" name="component.css" target="head" />
and I get this exception: GET http://localhost:8080/MY_APPLICATION/resources/component.css 404 (Not Found)
It's looking for it relatively to the projects, and not to the Jar project!
How can I make it relative to the JAR project?
EDITED
The JAR tree is:
META-INF
--resource
-- components
myComp.xhtml
components.css
-- img
-- scripts
--components.taglib.xml
--faces.config.xml
The war is a regular dynamic project:
WEB-INF
--lib
myJar.jar
-- web.xml
-- faces-config.xml
testComp.xhtml
Your JAR directory structure should be:
META-INF
--resources
-- components
myComp.xhtml
-- css <-- The library defined in the stylesheet
components.css <-- A stylesheet resource in the library
-- img
-- scripts
--components.taglib.xml
--faces.config.xml
Since, you are specifying the library name as css in the h:outputStylesheet tag with the resource name as component.css, the file should be present in a directory named css located in META-INF/resources directory of the JAR file.
Also, consider using a library name that is not bound to conflict with other names, if you intend to allow other developers to use your JAR.
AFAIK, the resource needs to be located in the same directory as the composite component. Have you tried to put the css in the same library?