Hi,
I have build an MVC spring project using STS, and I have integrated tiles within this project.
Now I can't set any css template in my project. I'm not sure if I address the wrong url to my message.properties. please have a look:
app-context.xml
theme-blue.propertiesHTML Code:<bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource"> <property name="basename" value="classpath:messages" /> <property name="defaultEncoding" value="UTF-8" /> </bean> <bean id="themeSource" class="org.springframework.ui.context.support.ResourceBundleThemeSource"> <property name="basenamePrefix" value="theme-" /> </bean> <!-- Theme Change Interceptor and Resolver definition --> <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>
I have also tried /themes/blue.cssHTML Code:css=themes/blue.css
theme-black.properties
layout.jspHTML Code:css=themes/black.css
When I run the project, I can't see the css style. I also can't change the style from the user interface.HTML Code:<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%> <%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <link rel="stylesheet" href="<spring:theme code='css'/>" type="text/css"/> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title><tiles:insertAttribute name="title" ignore="true" /></title> </head> <body> .... </body> </html>
any idea?
Thanks.
Please see the attached snapshot (shows the project structure).
pemsy.jpg


Reply With Quote