• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

Spring boot themes source not found

Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
/WEB-INF/classes/com package contains

/WEB-INF/classes/com/config package contains
@Configuration @ComponentScan("com") @EnableWebMvc public class AppConfiguration extends WebMvcConfigurerAdapter { @Bean public ThemeSource themeSource() { ResourceBundleThemeSource source = new ResourceBundleThemeSource(); source.setBasenamePrefix("themes-"); return source; } @Bean public ThemeResolver themeResolver(){ CookieThemeResolver resolver = new CookieThemeResolver(); resolver.setCookieMaxAge(2400); resolver.setCookieName("mythemecookie"); resolver.setDefaultThemeName("default"); return resolver; } /* End */ ); return resolver; }
@Override public void addInterceptors(InterceptorRegistry registry) {  newThemeChangeInterceptor themeInterceptor = new ThemeChangeInterceptor(); themeInterceptor.setParamName("theme"); registry.addInterceptor(themeInterceptor); }   @Override public void addResourceHandlers(final ResourceHandlerRegistry registry) { registry.addResourceHandler("/themes/**").addResourceLocations("classpath:/themes/"); } }
and Initializer class
/WEB-INF/lib folder contain
i compiled by
javac -cp ../lib/* com\SpringJspExample.java com\controller\HelloController.java com\config\*.java
and i packaged all files and folders using jar commad
jar -cv0mf manifest. txt SpringDemo. war WEB-INF resources themes org

when i run the springdemo. war using
java -jar SpringDemo. war
embedded tomcat server started successfully.
after i opened the browser and type
browser display 500 internal server error
in the dos prompt following exception display
Theme ‘default’: No message found under code ‘css’ for locale ‘en_US’ ” 
please help me to correct  this problem..
Posts: 2061
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Maybe, what you can do is to use InteilliJ or Eclipse IDE to package your project.
And then run the main class to see if you can launch the http://localhost:8080/index

And I think most Spring boot application is packaged as jar , not war.
If somebody says you look familiar, tell them you are in porn. Or in these tiny ads:
SKIP - a book about connecting industrious people with elderly land owners
    Bookmark Topic Watch Topic
  • New Topic