Jump to content
Changes to the Jaspersoft community edition download ×

solved- Jasper7.1 CSS access gives 404 error


SETTURGOPI

Recommended Posts

Hi All,

the CSS for the Jasper 7.1 gives error. The CSS files are not getting executed . as a result the login page or any page in UI is garbled in display. The acess log in tomcat shows that after login.html. all the udnerlying CSS failed to load.

127.0.0.1 - - [17/Sep/2018:10:56:24 +0800] "GET /jasperserver HTTP/1.1" 302 -
127.0.0.1 - - [17/Sep/2018:10:56:29 +0800] "GET /jasperserver/ HTTP/1.1" 200 1204
127.0.0.1 - - [17/Sep/2018:10:56:29 +0800] "GET /jasperserver/home.html HTTP/1.1" 302 -
127.0.0.1 - - [17/Sep/2018:10:56:43 +0800] "GET /jasperserver/runtime/E14C344C/themes/reset.css HTTP/1.1" 200 1200
127.0.0.1 - - [17/Sep/2018:10:56:45 +0800] "GET /jasperserver/login.html HTTP/1.1" 200 59354
127.0.0.1 - - [17/Sep/2018:10:56:46 +0800] "GET /jasperserver/_themes/C3589B36/jasper-ui/jasper-ui.css HTTP/1.1" 404 48863
127.0.0.1 - - [17/Sep/2018:10:56:46 +0800] "GET /jasperserver/_themes/C3589B36/jquery-ui/jquery-ui.css HTTP/1.1" 404 48863
127.0.0.1 - - [17/Sep/2018:10:56:46 +0800] "GET /jasperserver/_themes/C3589B36/panel.css HTTP/1.1" 404 48863
127.0.0.1 - - [17/Sep/2018:10:56:46 +0800] "GET /jasperserver/_themes/C3589B36/menu.css HTTP/1.1" 404 48863
127.0.0.1 - - [17/Sep/2018:10:56:46 +0800] "GET /jasperserver/_themes/C3589B36/simpleColorPicker.css HTTP/1.1" 404 48863
127.0.0.1 - - [17/Sep/2018:10:56:46 +0800] "GET /jasperserver/_themes/C3589B36/themeMinimal.css HTTP/1.1" 404 48863
127.0.0.1 - - [17/Sep/2018:10:56:46 +0800] "GET /jasperserver/_themes/C3589B36/webPageView.css HTTP/1.1" 404 48863
127.0.0.1 - - [17/Sep/2018:10:56:46 +0800] "GET /jasperserver/_themes/C3589B36/pagination.css HTTP/1.1" 404 48863
127.0.0.1 - - [17/Sep/2018:10:56:46 +0800] "GET /jasperserver/_themes/C3589B36/attributes.css HTTP/1.1" 404 48863
127.0.0.1 - - [17/Sep/2018:10:56:46 +0800] "GET /jasperserver/_themes/C3589B36/importExport.css HTTP/1.1" 404 48863
127.0.0.1 - - [17/Sep/2018:10:56:46 +0800] "GET /jasperserver/_themes/C3589B36/manageTenants.css HTTP/1.1" 404 48863
127.0.0.1 - - [17/Sep/2018:10:56:46 +0800] "GET /jasperserver/_themes/C3589B36/notifications.css HTTP/1.1" 404 48863
127.0.0.1 - - [17/Sep/2018:10:56:46 +0800] "GET /jasperserver/_themes/C3589B36/overrides_custom.css HTTP/1.1" 200 683
127.0.0.1 - - [17/Sep/2018:10:56:46 +0800] "GET /jasperserver/_themes/C3589B36/dashboard/toolbar.css HTTP/1.1" 404 48863
127.0.0.1 - - [17/Sep/2018:10:56:46 +0800] "GET /jasperserver/_themes/C3589B36/dashboard/canvas.css HTTP/1.1" 404 48863
127.0.0.1 - - [17/Sep/2018:10:56:46 +0800] "GET /jasperserver/_themes/C3589B36/dashboard/designer.css HTTP/1.1" 404 48863

------------------------------------

by default, the themes are loaded from WEB-INF/application-context-themes.xml ahs two options 1. Load themes from DB and 2. Load from Themes in physical file system.

we commented out the load themes from DB and the forced the applciation to load themes from physical file system and the issue fixed and all CSS / Jsp oads fine.

PLEASE USE THE BELOW APPLCIATIONCONTEXT-THEMES.XML AND REPLACE THE ORIGINAL CONTENT.

==========================

<?xml version="1.0" encoding="UTF-8"?>

<!--
  ~ Copyright © 2005 - 2018 TIBCO Software Inc.
  ~ http://www.jaspersoft.com.
  ~
  ~ This program is free software: you can redistribute it and/or modify
  ~ it under the terms of the GNU Affero General Public License as published by
  ~ the Free Software Foundation, either version 3 of the License, or
  ~ (at your option) any later version.
  ~
  ~ This program is distributed in the hope that it will be useful,
  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  ~ GNU Affero General Public License for more details.
  ~
  ~ You should have received a copy of the GNU Affero General Public License
  ~ along with this program.  If not, see <https://www.gnu.org/licenses/>.
  -->

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:util="http://www.springframework.org/schema/util"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
        http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.1.xsd">
    <!-- To run the theme from the file system, uncomment the two beans below and comment out the three following beans
         Notes:
               0. this mode is convenient for designing/debugging a theme
               1. in this mode you cannot change themes dynamically
               2. you must have a directory under /webapp/themes/[themeName] with a name that matches the value for the property 'defaultTheme'
               3. you must have the file /main/webappAdditions/classes/themes/[themeName].properties where there is a correct name/value pair
                  for each required theme file, e.g. theme.css=themes/[themeName]/theme.css

     -->

    
    <bean id="themeResolver" class="org.springframework.web.servlet.theme.FixedThemeResolver">
        <property name="defaultThemeName" value="default"/>
    </bean>

    <bean id="themeSource" class="org.springframework.ui.context.support.ResourceBundleThemeSource">
        <property name="basenamePrefix" value="themes."/>
    </bean>
       

    <!-- To run the themes from the repository, uncomment the three beans below and comment out the two beans above 


    <bean id="themeResolver" class="com.jaspersoft.jasperserver.war.themes.JSThemeResolver">
        <property name="defaultThemeName">
            <util:property-path path="configurationBean.themeDefaultName"/>
        </property>
        <property name="delegate" ref="jsThemeResolver"/>
    </bean>

    <bean id="jsThemeResolver" class="com.jaspersoft.jasperserver.war.themes.MTThemeResolver">
        <property name="defaultThemeName">
            <util:property-path path="configurationBean.themeDefaultName"/>
        </property>
        <property name="tenantService" ref="${bean.hibernateTenantService}" />
    </bean>

    <bean id="themeSource" class="com.jaspersoft.jasperserver.war.themes.RepositoryFolderThemeSourceImpl">
        <property name="themeCache" ref="themeCache"/>
    </bean>
-->
    <bean id="themeUtils" class="com.jaspersoft.jasperserver.war.themes.ThemeUtils">
        <property name="configurationBean" ref="configurationBean" />
    </bean>

    <bean id="themeCache" class="com.jaspersoft.jasperserver.war.themes.ThemeCache">
        <property name="repositoryService" ref="unsecureRepositoryService"/>
        <property name="configurationBean" ref="configurationBean" />
        <property name="tenantService" ref="${bean.hibernateTenantService}" />
        <property name="refreshThemeAfterUpdateInSeconds" value="5" />
        <property name="themeUtils" ref="themeUtils" />
    </bean>

    <bean id="themeService" class="com.jaspersoft.jasperserver.war.themes.ThemeServiceImpl">
        <property name="tenantService" ref="${bean.tenantService}" />
        <property name="configurationBean" ref="configurationBean" />
        <property name="repositoryService" ref="${bean.repositoryService}" />
        <property name="resourceFactory" ref="mappingResourceFactory" />
    </bean>

    <bean id="themeContextFilter" class="com.jaspersoft.jasperserver.war.themes.ThemeContextFilter">
        <property name="themeResolver" ref="themeResolver" />
        <property name="themeSource" ref="themeSource" />
    </bean>

</beans>

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...