How can I serve static content in liferay? I have a directory structure with htmls, css, etc., And I would like to serve it with a type address http://localhost:8080/myStaticContent/index.html, etc.
http://localhost:8080/myStaticContent/index.html
I do not want to use a front-end HTTP server such as apache.
I did this by deploying .war with only static content. The path is the liferay url / war_name URL.
So, if I have a war with a file like this:
myproj.war +-- myDir +-- myFile.html
Url will look like http://localhost:8080/myproj/myDir/myFile.html
http://localhost:8080/myproj/myDir/myFile.html
I assume Liferay uses JBoss or Tomcat in this case. Try the following:
[jboss-home]/server/[config-name]/deploy/jboss-web.deployer/server.xml
<Context path="/myStaticContent" docBase="/absolute/path/to/static/content" debug="0" reloadable="true"/>
"Host" :
<Host name="localhost" .....> <!-- add it here --> </Host>
: , , - , - , . , )
liferays cdn (cdn = " " ). - - , , "". , - .
, , cdn , , , webapplication (, ). , .
, /, (, , dns) conbination apache/tomcat, apache, , , tomcat.
Source: https://habr.com/ru/post/1715058/More articles:Scheduled execution in a J2EE web application - javaAn algorithm to group files of different sizes into approximately equal blocks - algorithmВопрос о модульном тестировании: должно ли создание и удаление данных быть одним и тем же методом? - unit-testingHow to go to code in code from javascript - c #Delete last 10 characters from text file - cRefresh UltraGrid GroupBy Sort by Child Groups with ListChanged? - c #GetWindowLong (int hWnd, GWL_STYLE) returns weird numbers in C # - c #How do I filter lucene search results? - nhibernateScala immutable SortedSets are not “stable” when removed - scalaЗапуск события AutoCad EndPlot слишком скоро (С#, API) - c#All Articles