Unable to load another page in JHipster on Production

I have an issue with the Pprod profile. I have created two pages: index.html and profile.html

When I run the project with production profile then the index page is working fine for me. I.e. it converts all CSS, JS and replaces all HTML with the new URL.

If I replace profile.html with index.html then again it is all working fine for me. I.e. it converts all CSS, JS and replaces all HTML with the new URL.

But, if I run both pages simultaneously, then only index.html is working fine for me and profile.html is not.

On profile.html page HTML, the URL is not changed with script.js and main.css file.

Failed to load resource: the server responded with a status of 404 (Not Found) abc.com/styles/postLogin.css

Failed to load resource: the server responded with a status of 404 (Not Found) abc.com/scripts/profile.js

Failed to load resource: the server responded with a status of 404 (Not Found) abc.com/scripts/main.js

Failed to load resource: the server responded with a status of 404 (Not Found) abc.com/scripts/profile/app/app.js

Failed to load resource: the server responded with a status of 404 (Not Found) abc.com/scripts/profile/directive/profile-directive.js

Failed to load resource: the server responded with a status of 404 (Not Found) abc.com/scripts/profile/controller/profile-controller.js

Failed to load resource: the server responded with a status of 404 (Not Found) abc.com/scripts/profile/service/profile-service.js

Any ideas? Thanks in advance.

Answers


First you need to upgrade to our latest 0.8.3 version, which I just released 2 minutes ago. It fixes several issues in "production" mode, which probably affect you:

http://jhipster.github.io/2014/01/29/jhipster-release-0.8.3.html

Secondly, your main problem is that JHipster is designed to create a "single page" webapp, so obviously if you have two Web pages you will have some minor trouble. The only thing you need to do, AFAIK, is to add your file to the WebConfigurer.initStaticResourcesProductionFilter class, just after the "/index.html" line:

staticResourcesProductionFilter.addMappingForUrlPatterns(disps, true, "/profile.html");

That way your file will be served by the "production" filter.


Need Your Help

How to display the extjs chart and the extjs grid in one page

extjs salesforce

In my requirement I have to display the pie chart and the grid panel which should show the statistics data when we click on the commandlink. So I have developed the pie chart in 4.0.7 version and the

C# How check if object is created in using statement

c# using

I have a class MyClass. I want to create MyClass instance in using statement and to operation something 1 in constructor, but if instance is created as nested in using statement with other instance...