Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6339727
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T19:42:04+00:00 2026-05-24T19:42:04+00:00

this is how I intialize theme beans: <bean id=themeSource class=org.springframework.ui.context.support.ResourceBundleThemeSource> <property name=basenamePrefix value=resources.theme- />

  • 0

this is how I intialize theme beans:

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

<bean id="themeChangeInterceptor"
    class="org.springframework.web.servlet.theme.ThemeChangeInterceptor">
    <property name="paramName" value="theme" />
</bean>

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

    <bean id="handlerMapping"
    class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping">
    <property name="interceptors">
        <list>
            <ref bean="localeChangeInterceptor" />
            <ref bean="themeChangeInterceptor" />
        </list>
    </property>
</bean>

this is my folder stucture:

enter image description here

these are the inside of my 3 properties files:

css=themes/black.css
css=themes/blue.css
css=themes/default.css

I have also tried these:

  1. css=classpath:themes/default.css
  2. css=/themes/default.css
  3. css=./themes/default.css

Should the css even be in WEB-INF/classes. I’ve tried moving it out and in etc, but never quite seemed to get it to work.

Here is how I put it in my JSP:

<link rel="stylesheet" href="<spring:theme code='css'/>" type="text/css" />

This is now my output looks like:

enter image description here

This is part of JSP:

<span style="float: left">
<a href="?theme=default">def</a>
|
<a href="?theme=black">blk</a>
|
<a href="?theme=blue">blu</a>
</span>

This is my black.css.

body {
    background-color: #888;
    color: white;
}

My problem is, that the css never seems to go on my JSP file. This is probably caused because properties file can not find css file…
Feel free to ask further info.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T19:42:04+00:00Added an answer on May 24, 2026 at 7:42 pm

    What I needed to do here, was to move my resources(js or css files) to root folder of my project.

    The second thing I could do instead, is to create a resource mapping for my css files.

    Both would work, but I went with the first solution at the moment.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose I have a class with a string instance attribute. Should I initialize this
Hi, i'm have this code for initialize my class. - (id)initWithSize:(int)size { self =
I have multiple context files. Requirement is: one particular Bean (which makes some configuration
Hard to think of a title for this one! I have a bean that
Do you bother initialising java bean values? Say, for example: ([g|s]etters omitted) public class
I have the following class: import org.apache.commons.beanutils.BeanUtils; import com.thoughtworks.xstream.XStream; ... public class MyBean {
In this example: class A { public A() { // pre-init1 // post-init1 }
So, this is a question of coding style more or less. I'm using Bean
For example i have two beans: class Bean1 { private SomeService service1; private SomeService
Is there a particular way to initialize an IList<T> ? This does not seem

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.