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 7085757
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:27:52+00:00 2026-05-28T07:27:52+00:00

I have a problem with Spring 3.0.7 Request mapping and the Spring standard theme

  • 0

I have a problem with Spring 3.0.7 Request mapping and the Spring standard theme implementation.

My controllers are implemented as follows

@ Controller
@RequestMapping(value="myUrl")
Public MyControllerClass

 @RequestMapping(Method=requestMethod.GET)
 Public myGetHandler (){
 }

So a URL with http://myApp/myUrl is handled and all is good.

Themes are activated by a link link this

 <a href="?theme=mytheme"/>

and the spring config for themes is

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

So if I am on the myUrl page and I click this link the theme is loaded and myGetHandler also invoked.

however

if I add a parameter to my URL

 /myUrl?someParm=somevalue 

now my controller works as before and i can access the parameter but clicking on the themes link ( see href above ) which for this page looks like this

/myUrl?theme=myTheme

causes an exception and neither the page or the theme load. I will post the stack trace later but it suggested a problem in the controller ( and not theme interceptor ).

How can I map my controller so that themes and a parameterized URL work? Ideally I think I want to change my request mapping to only handle my parameterized url and nothing else ?

I tried changing my request mapping to

   @RequestMapping(value="myUrl",params = "someParam=someValue") 

While this works for the links with my parameters it fails for the theme link.

  • 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-28T07:27:52+00:00Added an answer on May 28, 2026 at 7:27 am

    My guess is then in case when url is with params , click on <a href="?theme=mytheme"/> casues double “?” in destination url like /myUrl?someParm=somevalue?theme=mytheme.

    You should use something like c:url or some javascript to build url with only one ? and & as params delimeter

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

Sidebar

Related Questions

I have a problem with my spring controller/request mapping struture. In web.xml I have
I have what seems like a simple problem. I have a Spring web app,
I have a problem while converting a string whose value is dd.mm.yyyy to DateTime
I have a self-executable jar program that relies heavily on Spring Integration. The problem
I have this odd problem with Spring AOP and I am hoping someone can
I have web application wich uses jsf 2.0 and spring 3.0 The problem is
I have problem using annotated validation in spring 3 mvc. I´m not sure if
I have similar problem as is described in Spring Framework - New object is
Using Spring/SpringMVC 3.0.5 I've defined a method in my controller like this: @RequestMapping(params =
I have problem with LDAP Spring Security, I'm trying to authorise against the LDAP

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.