11-03-2016 12:46 PM
Hello,
I have generated maven alfresco amp project and I have folder web with css,scrips and so on.
In order to import some css file in webscript html, what exactly the path to this directory should be?
I tried with some variants but ...nothing is found.
And is this content public how can I reach it in the browser?
Thank you in advance.
11-03-2016 05:42 PM
Hi,
Just create an AIO maven project.
The alfresco amp is created with a demoamp.css file.
I manage to access it using that URL : http://localhost:8080/alfresco/css/demoamp.css
11-03-2016 05:42 PM
Hi,
Just create an AIO maven project.
The alfresco amp is created with a demoamp.css file.
I manage to access it using that URL : http://localhost:8080/alfresco/css/demoamp.css
11-04-2016 04:44 AM
No need of AIO project.
I wanted to reach the created demoamp.css file.
so I just imported href="${url.context}/css/demoamp.css in my html file.
That's the URL which I needed. Thanks!
11-14-2016 09:38 AM
I installed my custom AMP to alfresco system and now the CSS is not working and I can't access it with the above url.
While I was running it through my IDE , everything was ok and it managed to access the above url
Do you know what the reason could be ? What have I missed?
11-14-2016 09:45 AM
Hi,
Can you list the files in the alfresco/css folder ($ALF_HOME/tomcat/webapps/alfresco) ?
After applying the AMP against the war, did you clear that folder ? If you didn't maybe tomcat did not re-deploy the war with your customisation.
For more information about applying an AMP : Installing an Alfresco Module Package | Alfresco Documentation
Yann
11-14-2016 10:04 AM
Yes, I did clear the alfresco folder in tomcat/webapps before install the amp.
In general in tomcat\webapps\alfresco\css I should see my custom CSS or ?
11-14-2016 10:35 AM
I just install an AMP against Alfresco.war with '-verbose'. From what I saw the web folder is not mapped in the war as the documentation said : AMP to WAR mapping | Alfresco Documentation
Adding files relating to version '1.0-SNAPSHOT' of module 'test'
- File '/WEB-INF/lib/test-1.0-SNAPSHOT.jar' added to war from amp
- File '/WEB-INF/classes/alfresco/extension/templates/webscripts/helloworld.get.desc.xml' added to war from amp
- File '/WEB-INF/classes/alfresco/extension/templates/webscripts/helloworld.get.html.ftl' added to war from amp
- File '/WEB-INF/classes/alfresco/extension/templates/webscripts/helloworld.get.js' added to war from amp
- Directory '/WEB-INF/classes/alfresco/extension/templates/webscripts' added to war
- Directory '/WEB-INF/classes/alfresco/extension/templates' added to war
- Directory '/WEB-INF/classes/alfresco/extension' added to war
- File '/WEB-INF/classes/alfresco/module/test/context/webscript-context.xml' added to war from amp
- File '/WEB-INF/classes/alfresco/module/test/context/service-context.xml' added to war from amp
- File '/WEB-INF/classes/alfresco/module/test/context/bootstrap-context.xml' added to war from amp
- Directory '/WEB-INF/classes/alfresco/module/test/context' added to war
- File '/WEB-INF/classes/alfresco/module/test/model/content-model.xml' added to war from amp
- File '/WEB-INF/classes/alfresco/module/test/model/workflow-model.xml' added to war from amp
- Directory '/WEB-INF/classes/alfresco/module/test/model' added to war
- File '/WEB-INF/classes/alfresco/module/test/module-context.xml' added to war from amp
- File '/WEB-INF/classes/alfresco/module/test/alfresco-global.properties' added to war from amp
- File '/WEB-INF/classes/alfresco/module/test/log4j.properties' added to war from amp
In order to fix, you need to add a file-mapping.properties file with the following content :
include.default=true
/web=/
PS : Maybe you don't need to update 2 thread.
Yann
11-15-2016 03:20 AM
Hi,
I created the property file - file-mapping.properties in src/main/amp directory and added the above properties.
However, again it couldn't find the css and receive 404 error.
PS: I don't understand what you mean in your PS.
11-15-2016 03:25 AM
Hi,
Could you apply your AMP with -verbose option and put the output here ?
Can you see something like according to your AMP name/version/content :
Adding files relating to version '1.0-SNAPSHOT' of module 'test'
- File '/css/demoamp.css' added to war from amp
- File '/jsp/demoamp.jsp' added to war from amp
- Directory '/jsp' added to war
- File '/licenses/README-licenses.txt' added to war from amp
- Directory '/licenses' added to war
- File '/scripts/demoamp.js' added to war from amp
- File '/scripts/demoamp.js' added to war from amp
- File '/jsp/demoamp.jsp' added to war from amp
I was just saying that After installing custom AMP to Alfresco system - custom CSS, JS alerts and WebScript Exception handl... seems to be about the same issue we discuss here.
Yann
11-15-2016 03:37 AM
How did you install only /web content ?
As in general I uninstall the whole amp and re-install it again.
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.