0

I have an application in JSF, I have a static content like .js, .css, then I created a .jar with this content (static.jar), when I use this content inside a web application it works fine, however I want to access this content from a jar, I removed this content from a web project and I created a new project with this content, thus I generated a jar, is it possible in Jboss EAP 6.3 ?

enter image description here

<link rel="stylesheet" type="text/css" href="/static/css/barra.css" media="screen" />
        <link rel="stylesheet" type="text/css" href="/static/css/datatable.css" media="screen" />
        <link rel="stylesheet" type="text/css" href="/static/css/estilo.css" media="screen" />
        <link rel="stylesheet" type="text/css" href="/static/css/datepicker.css" media="screen" />

How to do it in JBoss EAP ?

Edson Cezar
  • 25,884
  • 5
  • 19
  • 27
  • I do not understand the purpose of doing so. Cause this is going to slow up the performance of the application. – Vivek Singh Oct 23 '15 at 18:25
  • JSF 2, right? This features is called 'resource library'. This link could help you http://stackoverflow.com/questions/11988415/what-is-the-jsf-resource-library-for-and-how-should-it-be-used. – Bruno Oct 23 '15 at 18:30
  • @VivekSingh probably he wanted to use this jar as an "cdn" for multiple applications... – Bruno Oct 23 '15 at 18:32
  • @BrunoSilva thanks for the information. – Vivek Singh Oct 23 '15 at 18:35
  • I already did it using a container like tomcat and jboss together, is possible to do it just using a jboss ? – Edson Cezar Oct 23 '15 at 18:36
  • @Bruno Silva that's exactly what I want to do – Edson Cezar Oct 23 '15 at 18:42
  • @EdsonCezar Yes, I had an application running multiples jar deployed on JBoss EAP/some modules on Wildfly. Pay attention to the folder structure, most errors that occurred when I used resource library for the first were related to incorrect package placement. – Bruno Oct 23 '15 at 18:47
  • @Bruno Silva here an example with tomcat https://www.moreofless.co.uk/static-content-web-pages-images-tomcat-outside-war/ – Edson Cezar Oct 23 '15 at 18:49
  • @Bruno Silva what I have to do, put a jar inside libs ? extract this content from some folder ? – Edson Cezar Oct 23 '15 at 18:50

0 Answers0