Results 1 to 1 of 1

Thread: Navigation Menu and webflow

  1. #1
    Join Date
    Aug 2006
    Posts
    17

    Default httpClient and MVC

    I have a problem with httpClient. I have 2 projects. From Project 1, one of actions, I called project2 with httpClient call.

    From project2, login.jsp
    .....
    <spring:bind path="userId">
    <input type="hidden" name="userId" value="${status.value}" />
    </spring:bind>

    from project2, loginController,
    public ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException{
    try{
    String userId = request.getParameter("userId");
    return new ModelAndView("web/login","userId",userId);
    }
    ...
    ...
    }

    I got the correct userId in project2 controller that I passed from project1 httpClient call.
    However, I got the following exception.

    [com.xxx.controller.LoginController:36] - <userId in loginController: test
    INFO - <HTTP Status returned : 200>
    org.apache.jasper.runtime.JspFactoryImpl internalGetPageContext
    SEVERE: Exception initializing page context
    java.lang.IllegalStateException: Cannot create a session after the response has been committed
    at org.apache.catalina.connector.Request.doGetSession (Request.java:2195)
    at org.apache.catalina.connector.Request.getSession(R equest.java:2017)
    at org.apache.catalina.connector.RequestFacade.getSes sion(RequestFacade.java:822)
    at javax.servlet.http.HttpServletRequestWrapper.getSe ssion(HttpServletRequestWrapper.java:215)



    Please suggest me what I should do with this.

    Thanks.
    Last edited by fedor_dz; Oct 9th, 2006 at 04:44 PM. Reason: title does not match with content

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •