Spring Boot application on Prime Faces is not displaying CSS after deployment to Heroku

I'm currently using a combination of Spring 3.1.3, Prime Faces 3.4.2, Hibernate 3.6.8, and Pretty Faces 2.0.4.

When I deploy my application on a local server (Apache Tomcat 7), the CSS displays properly. However, when I deploy the same project to Heroku, the CSS does not show up.

This is how I include the CSS in my main.xhtml template file:

<h:outputStylesheet library="css" name="bootstrap.css" />
<h:outputStylesheet library="css" name="custom.css" />

Here is the HTML source result on the local server:

<link type="text/css" rel="stylesheet" href="/evaluation-cloud/javax.faces.resource/theme.css.jsf?ln=primefaces-cupertino" />
<link rel="stylesheet" media="screen" type="text/css" href="/evaluation-cloud/javax.faces.resource/bootstrap.css.jsf?ln=css" />
<link rel="stylesheet" media="screen" type="text/css" href="/evaluation-cloud/javax.faces.resource/custom.css.jsf?ln=css" />
<link rel="stylesheet" media="screen" type="text/css" href="/evaluation-cloud/javax.faces.resource/primefaces.css.jsf?ln=primefaces" />

And this is the resulting HTML source when deployed to Heroku:

<link type="text/css" rel="stylesheet" href="//javax.faces.resource/theme.css.jsf?ln=primefaces-cupertino" />
<link rel="stylesheet" media="screen" type="text/css" href="//javax.faces.resource/bootstrap.css.jsf?ln=css" />
<link rel="stylesheet" media="screen" type="text/css" href="//javax.faces.resource/custom.css.jsf?ln=css" />
<link rel="stylesheet" media="screen" type="text/css" href="//javax.faces.resource/primefaces.css.jsf?ln=primefaces" />

Take note of the '//' in the href attribute.

I'm unsure why this issue is occurring. If anyone has encountered the same problem, please provide assistance.

Thank you.

Answer №1

By switching to jetty runner in the configuration, I was able to resolve the issue successfully.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Is it possible to update the CSS file of an external SVG file in real-time?

Is there a way for an SVG image to reference another CSS file? A webpage contains an SVG file. A button allows users to switch between classic colors and high contrast mode on the entire webpage, including the SVG image. Attempt w.css (white backgrou ...

Transferring multiple files from a directory using Windows file upload feature with Selenium

I've been using Selenium 2 to upload files to a website. While I can successfully upload one file by specifying the path, I'm looking to upload all files within a specific folder. Below is a snippet of my code: if (driver.findElements(By.xpath(" ...

I am encountering a horizontal scroll bar despite setting the width to 100%

I am just starting out as a beginner in web development. I decided to create a webpage to practice my HTML and CSS skills. However, when I set the width of all elements to 100%, I noticed that I am getting a horizontal scroll bar. I have tried troubleshoot ...

Are there any performance implications when using an excessive number of background images in CSS?

My website seems to be running too slowly based on user reports. I suspect that the background images in CSS may be causing the issue. The site uses a custom build system to concatenate and compress all CSS, create CSS sprites automatically, resulting in ...

Looking to include some extra padding when an item is displayed - jQuery

So, I'm working on a jQuery code snippet that controls the visibility of a rectangle element: $("#rectangle").hide(); $("#toggle-rec").click(function () { $("#rectangle").toggle(2000); }); This code hides the rectangle initially and toggles it ...

Printing CSS in ASP.NET without a print dialog box or a pop-up confirmation message after successful printing

My goal is to create a list of greeting cards, each printed to a specific size (A4 folded down the longer edge), using HTML and CSS. I want the cards to be rotated 90° on the page. Ideally, I'd like to print the list without viewing the HTML and bypa ...

What advantages does including @charset "ISO-8859-15"; at the top of a CSS file provide?

Why would adding @charset "ISO-8859-15"; or @charset "utf-8"; at the beginning of a CSS file be advantageous? ...

Prevent css from reverting to its original rotation position

I attempted to style the navigation list with the following CSS: #navlist:hover #left-arrow { border-top: 10px solid white; position: relative; transform: translateX(120.2px) rotate(180deg); } Would it be better to use jQuery for the rotation ...

What is the method to display checkboxes using Selenium?

Is there a way to display the Visible Text of all checkboxes on a webpage using Selenium with Java? ...

Ways to fill ng-style with a CSS object

Creating a dynamic form to manipulate CSS properties in real time has been my latest project. I've managed to define the CSS property names and values within an object, but now I'm struggling to style the item elegantly on the page as the user in ...

Ways to align the contents of a div in the center

Looking at the content in this div, it seems that the top is positioned higher than the bottom. Can anyone provide some guidance on how to fix this? .dtestContactDet{ border-bottom:1px solid #D7D7DE; border-bottom:1px solid #D7D7DE ; -khtml-border-bo ...

Error: Incompatibility in FragmentManager versions for Android platform

I'm facing an unusual issue with Android development. I am utilizing Fragments and FragmentActivities from the android.support.v4.app packages, but encountering a problem where FragmentActivity.getFragmentManager() returns an object of type android.ap ...

How to conceal table cells on Safari 5?

My code works on Firefox and IE, but not on Safari. Here's an example: <table> <thead> <tr> <th style="display: none;">hi</th> </tr> </thead> <tr class="someClass"> <td style= ...

The progress bar seems to be malfunctioning

Need help with my progress bar, it's not working properly. Can someone assist me? var x = document.getElementById("p_bar"); for(var i = 0; i < 100; i++) { var wid; wid=1; if(wid == 800) break; else wid+=8; x.style.width=wid+" ...

Error encountered: NullPointerException in ApplicationMap of Spring MVCPossible solution

I'm facing an issue with a Spring MVC JSP application where I intermittently encounter a null pointer exception. This exception is sometimes resolved when I rerun the application or restart the admin service. I would appreciate any advice on how to ha ...

Permission for making Java Android calls may be denied by the user

The error message "Java Android call requires permission which may be rejected by user..." occurs when I attempt to use the getLastKnownLocation() method. It seems to be related to API23 and I am struggling to find a solution for it. ...

It appears that IE 10 is having trouble displaying modals, possibly due to a compatibility issue with jQuery 1.7.1's animate function

By visiting www.carsense.com and clicking on the login link in the top-right corner, you may notice that the curtain appears but the modal itself does not display, even though it exists: If you locate id="content1" and modify the inline opacity to 1, the ...

Login to Facebook using activity 1, then share a post on your Facebook wall with activity 2

I'm currently in the process of developing an Android app that utilizes Facebook to post status updates to the user's wall. The integration part has been successfully implemented, with the use of Facebook SDK 3.0. My user interface is structured ...

What methods are available to modify either the key or value within a hash map?

If we have a Hash Map containing key-value pairs and need to update either the key or value, what is the best approach? ...

Steps to implement the selection of multiple items from a drop-down or list on a React.js website

Hi there, I am a newcomer to the world of React JS web development. I am looking for guidance on how to implement a feature where users can select multiple cities from a drop-down or list, similar to the examples shown in image1. Once the user has made th ...