Announcement Announcement Module
Collapse
No announcement yet.
Is this a ClassLoader issue for AbstractController? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Is this a ClassLoader issue for AbstractController?

    Hi,

    For the following code, I put String urlReq = "value" first in handleRequestInternal() and set up a breakpoint there. Then I run this Spring 2.0 MVC app in debug mode. It shows me "value" when breakpoint is reached. Then I change String urlReq = "value2" and fire http request again. When breakpoint is reached again this time urlReq still equals to "value" rather than "value2".

    Please note that I change the value in source code but don't rebuild and re-deploy the war. I don't have this kind of issue with class extented from SimpleFormController. Can anyone tell me if there is a ClassLoader issue with AbstractController? Thanks!

    Code:
    <bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
            <property name="mappings">
                <props>
                    <prop key="/test.htmll">earthController</prop>
                </props>
            </property>
    </bean>
    
    <bean id="earthController" class="action.EarthController" />
    
    public class EarthController extends AbstractController {
    
    @Override
    protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception {
    String urlReq = "value";
    //logic to return xml response
    return null;
    }
    }
Working...
X