Announcement Announcement Module
No announcement yet.
redirect: queryString stripped off Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • redirect: queryString stripped off

    In the application deployed in production we face an issue where the redirect from one page to another strips off the query string.
    The issue happens when a page is edited and a success message has to be displayed to the user.

    Strange behavior:
    We migrated the code from
    Old Env --> JDK 1.4/ Weblogic 8 (App server)/ Sun One 6.1 (web server)
    to New Env --> JDK 1.6/ Weblogic 10.3.4 (App server)/ iPlanet 7.1 (web server) from one environment to new environment.
    The redirect works fine in the Old environment and the local setup. In the local setup we dont have iPlanet Web server but hit the Weblogic directly

    Controller code:
    return new ModelAndView("redirect:/" + id + "&messageKey=common.edit.success");

    Interceptor code
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object arg2) throws Exception {
    HttpSession session = request.getSession();
    String queryString = request.getQueryString();
    logger.debug("^^^ Querystring : " + queryString + " ^^^^^ ");
    //The queryString is null here
    return true;

    <bean id="urlMapping" class="org.springframework.web.servlet.handler.Sim pleUrlHandlerMapping">
    <property name="interceptors">
    <ref bean="openSessionInViewInterceptor"/>
    <ref bean="cacheControlChecker"/>
    <ref bean="accessChecker"/>
    <ref bean="sessionChecker"/>
    <ref bean="latestUrlInterceptor"/>
    <property name="mappings">
    <prop key="/">editNewsController</prop>

    The same logic works fine when there is no query string in the URL

    When we give the full URL in the browser, it displays the success message along with the news item that it has to display correctly
    i.e. https://<>/<application-context>/

    This is very strange behaviour as the code works perfectly fine in the local machine as well as the Old environment. The spring version has not changed and the version is : <version>1.2.6</version>

    1. Has this issue got anything to do with Spring - The reasoning is that the code works fine in local as well as Old environment without any change in the spring dependent jar files

    2. Is this behavior a result of the new iPlanet Web server that is configured. Http protocol in Old and New is same --> HTTP/ 1.1

    Appreciate your help in resolving the issue.
    Last edited by sridhar.m; Jun 21st, 2011, 04:21 AM.

  • #2
    The problem was identified with the iPlanet Web server - Weblogic plugin. Detailed trace helped to narrow down the issue where the web server removed the query string from the request and when it wrote to the application server the query string was removed.
    Solution from Oracle Support: Disable the weblogic plugin on the web server and enable reverse-proxy in the web server.
    This solved the problem and now the query string doesn't get removed.