Cannot forward a response that is already committed  exeption after Log out

Hello,
I am using Jdeveloper 11.1.1.3.0, ADF DC, ADF Faces, ADF security.
I have a logout button in my template, and I want the user to go back to login page (login.html; which was generated automaticlly when you use ADF security) after successful Log out.
here is my logout method
    public String doLogOut() throws IOException {
        // Add event code here...
        ExternalContext ectx =
            FacesContext.getCurrentInstance().getExternalContext();
        HttpServletResponse response = (HttpServletResponse)ectx.getResponse();
        HttpSession session = (HttpSession)ectx.getSession(false);
        session.invalidate();
        response.sendRedirect("login.html");
        return null;      
    }when I click the log out button, every thing seems ok, and the user redirected to login.html page. However, I see the following Exception in Jdeveloper Log window.
<Jan 4, 2012 12:16:31 PM EET> <Error> <HTTP> <BEA-101020> <[ServletContext@19059163[app:CTP-New module:CTP-New-ViewController-context-root path:/CTP-New-ViewController-context-root spec-version:2.5 version:V2.0]] Servlet failed with Exception
java.lang.IllegalStateException: Cannot forward a response that is already committed
     at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:122)
     at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:410)
     at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
     at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
     at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
     Truncated. see log file for complete stacktrace
>
<Jan 4, 2012 12:16:31 PM EET> <Notice> <Diagnostics> <BEA-320068> <Watch 'UncheckedException' with severity 'Notice' on server 'DefaultServer' has triggered at Jan 4, 2012 12:16:31 PM EET. Notification details:
WatchRuleType: Log
WatchRule: (SEVERITY = 'Error') AND ((MSGID = 'BEA-101020') OR (MSGID = 'BEA-101017') OR (MSGID = 'BEA-000802'))
WatchData: DATE = Jan 4, 2012 12:16:31 PM EET SERVER = DefaultServer MESSAGE = [ServletContext@19059163[app:CTP-New module:CTP-New-ViewController-context-root path:/CTP-New-ViewController-context-root spec-version:2.5 version:V2.0]] Servlet failed with Exception
java.lang.IllegalStateException: Cannot forward a response that is already committed
     at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:122)
     at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:410)
     at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
     at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
     at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
     at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
     at org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$OverrideDispatch.dispatch(FacesContextFactoryImpl.java:267)
     at com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:473)
     at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:141)
     at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:189)
     at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:193)
     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:710)
     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:273)
     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:205)
     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
     at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
     at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
     at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
     at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
     at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
     at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:97)
     at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
     at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
     at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
     at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
     at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
     at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
     at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:94)
     at java.security.AccessController.doPrivileged(Native Method)
     at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
     at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:414)
     at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138)
     at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
     at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:330)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
     at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
     at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3684)
     at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
     at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
     at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
     at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
     at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
     at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
     at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
     at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
SUBSYSTEM = HTTP USERID = <WLS Kernel> SEVERITY = Error THREAD = [ACTIVE] ExecuteThread: '11' for queue: 'weblogic.kernel.Default (self-tuning)' MSGID = BEA-101020 MACHINE = Mjabr-PC TXID =  CONTEXTID = 4b079561b4c220a0:10458ad0:134a7995c3f:-8000-0000000000000241 TIMESTAMP = 1325672191307 
WatchAlarmType: AutomaticReset
WatchAlarmResetPeriod: 30000
>Further more when I try to login again, I get this message in the browser
Error 403--Forbidden
From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
10.4.4 403 Forbidden
The server understood the request, but is refusing to fulfill it. Authorization will not help and the request SHOULD NOT be repeated. If the request method was not HEAD and the server wishes to make public why the request has not been fulfilled, it SHOULD describe the reason for the refusal in the entity. This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable.Any help is highly appreciated.

Thank you ADF7,
I used this method
    public String doLogOut() throws IOException {
        // Add event code here...
        FacesContext ctx = FacesContext.getCurrentInstance();
        HttpServletRequest request =
            (HttpServletRequest)ctx.getExternalContext().getRequest();
        ExternalContext ectx =
            FacesContext.getCurrentInstance().getExternalContext();
        try {
            ectx.redirect(request.getContextPath() +
                          "/login.html");
        } catch (Exception exp) {
            exp.printStackTrace();
        return null;
    }but when I re login again I get the same error in the browser
Error 403--Forbidden
From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
10.4.4 403 Forbidden
The server understood the request, but is refusing to fulfill it. Authorization will not help and the request SHOULD NOT be repeated. If the request method was not HEAD and the server wishes to make public why the request has not been fulfilled, it SHOULD describe the reason for the refusal in the entity. This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable.

Similar Messages

  • Javax.servlet.jsp.JspException: Cannot forward a response that is already committed at

              Hello,
              Went through the article
              http://dev2dev.bea.com/articles/platform7_feature.jsp
              I thought if you have a workaround for the following issue.
              Any help to solve this issue is much appreciated.
              thx,
              -Sujatha.
              I am using JATO framework and have developed JSP's.
              Running an application on top of weblogic 6.1 sp4 container.
              The OS is Solaris 5.8.
              Every time i access the jsp's, getting the following exception.
              java.lang.IllegalStateException: Cannot forward a response that is
              already committed
              at
              weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:132)
              at
              com.iplanet.jato.view.ViewBeanBase.forward(ViewBeanBase.java:346)
              at
              com.iplanet.jato.view.ViewBeanBase.forwardTo(ViewBeanBase.java:267)
              at
              com.iplanet.am.console.base.ConsoleServletBase.onUncaughtException(ConsoleServletBase.java:240)
              at
              com.iplanet.jato.ApplicationServletBase.fireUncaughtException(ApplicationServletBase.java:1023)
              at
              com.iplanet.jato.ApplicationServletBase.processRequest(ApplicationServletBase.java:469)
              at
              com.iplanet.jato.ApplicationServletBase.doPost(ApplicationServletBase.java:324)
              at
              com.iplanet.jato.ApplicationServletBase.doGet(ApplicationServletBase.java:294)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
              at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:262)
              at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:198)
              at
              weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2637)
              at
              weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2359)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              

    sorry, but just to make a additional note.
    the <c:import > tag library is from JSTL taglib <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
    regards,
    Junecello

  • Java.lang.IllegalStateException: Cannot forward a response that is

              Hello,
              Went through the article
              http://dev2dev.bea.com/articles/platform7_feature.jsp
              I thought if you have a workaround for the following issue.
              Any help to solve this issue is much appreciated.
              thx,
              -Sujatha.
              I am using JATO framework and have developed JSP's.
              Running an application on top of weblogic 6.1 sp4 container.
              The OS is Solaris 5.8.
              Every time i access the jsp's, getting the following exception.
              java.lang.IllegalStateException: Cannot forward a response that is
              already committed
              at
              weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:132)
              at
              com.iplanet.jato.view.ViewBeanBase.forward(ViewBeanBase.java:346)
              at
              com.iplanet.jato.view.ViewBeanBase.forwardTo(ViewBeanBase.java:267)
              at
              com.iplanet.am.console.base.ConsoleServletBase.onUncaughtException(ConsoleServletBase.java:240)
              at
              com.iplanet.jato.ApplicationServletBase.fireUncaughtException(ApplicationServletBase.java:1023)
              at
              com.iplanet.jato.ApplicationServletBase.processRequest(ApplicationServletBase.java:469)
              at
              com.iplanet.jato.ApplicationServletBase.doPost(ApplicationServletBase.java:324)
              at
              com.iplanet.jato.ApplicationServletBase.doGet(ApplicationServletBase.java:294)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
              at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:262)
              at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:198)
              at
              weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2637)
              at
              weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2359)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              

    thank you  dvohra21  the application is deployed in development .Its not session inactivity because this happen when l'm busy using the application ,reducing the application speed .

  • Java.lang.IllegalStateException: Cannot forward. Response already committed

    i have deployed my application on Websphere application server 5.0. most of the time my jsp page works properly with any exception, but somtime it give me expeception and display page uncompletely rendered.
    Follwoing exception occure on particual page with particular record and same page works correctly with other reocrds....
    java.lang.IllegalStateException: Cannot forward. Response already committed. (Servlet 2.3, SRV 8.4)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:160)
         at com.mcb.cpms.presentation.controllers.CPMSController.dispatchRequest(CPMSController.java:918)
         at com.mcb.cpms.presentation.controllers.CPMSController.doGet(CPMSController.java:1278)
         at com.mcb.cpms.presentation.controllers.CPMSController.doPost(CPMSController.java:1308)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
         at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
         at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
         at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
         at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:948)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:530)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:176)
         at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:79)
         at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:201)
         at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
         at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:114)
         at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:186)
         at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
         at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
         at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:610)
         at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:431)
         at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
    i will be thankfull if any one have any idea about it.....
    waiting for your immediate response

    Hi Junaid,
    Your code can be work correctly on different servers or with other records but it can not be handled with buffer or autoflush,
    I had same problem a few weeks ago. And lastly I had to control before printing any output. My application was working on WebSphere but not on Tomcat, so it is general problem.
    The only way if you have to put some output before sending redirect:
    When you want to redirect the page, write window.location = ... (javascript code).
    When page is loaded automatically will be redirected to the page you want. But of course it is a bit slow.
    Good Luck,
    isturk.

  • Cannot forward. Writer or Stream already obtained.

    hi Friends,
    had a small doubt to clarify
    I am using jsp:include tag to include a jsp page within a jsp
    <jsp:include page="../includes/empHeader.jsp" flush="true">
    <jsp:param name="empid" value="<%=empid%>"/>
    </jsp:include>
    <jsp:include page="../leave/leaverecordcomponent.jsp" flush="true">
    <jsp:param name="empid" value="<%=empid%>"/>
    </jsp:include>
    I am able to view empHeader.jsp but unable to view leaverecordcomponent.jsp
    I m getting this error
    Error 500: ERROR: Cannot forward. Writer or Stream already obtained. Error 500:
    However if i replace
    <jsp:include page="../leave/leaverecordcomponent.jsp" flush="true">
    by
    <jsp:include page="../employee/Skills.jsp" flush="true">
    then i can view empHeader.jsp and then Skills.jsp
    What's to be done ?
    Thanx

    I am guessing that "../leave/leaverecordcomponent.jsp" does a forward, either through a controller servlet, a filter, or on the page it self.
    What can you do? Prevent ../leave/leaverecordcomponent.jsp from doing a forward, because once the response is commited (something writtent to it), then you can not forward.

  • Error 500: ERROR: Cannot forward. Writer or Stream already obtained. Error

    hi
    i m unable to fugure out y I m getting this error
    it's a suggestion page and on submitting this page I have to reload the page but with status of the page (requires approval) in form of url
    earlier say few days back , it was working fine , i had absolutely no issues in this
    since 2-3 days everytime i submit the page , i m getting the error
    Error 500: ERROR: Cannot forward. Writer or Stream already obtained. Error 500
    my code is listed below
    pls help
    <%@ include file="../includes/sessionChecker.jsp"%>
    <%@ page isThreadSafe="false" errorPage="../html/messError.jsp" %>
    <%@ page import="java.io.*,java.util.*,java.sql.*" %>
    <%@ page import="com.syntaxsoft.util.*" %>
    <%@ page import="com.syntaxsoft.util.DateUtil" %>
    <%@ page import="com.syntaxsoft.admin.*" %>
    <%@ page import="com.syntaxsoft.employee.*" %>
    <%@ page import="com.syntaxsoft.db.*" %>
    <%@ include file="../includes/cssJsInclude.jsp"%>
    <%@ taglib uri="QuinnoxTags" prefix="QuinnoxTags" %>
    <html>
    <head>
    <title>Suggestions</title>
    <meta http-equiv="Content-Type" content="xls/html; charset=iso-8859-1">
    <link href="../STYLESHEET/stylesheet.css" rel="stylesheet" type="text/css">
    </head>
    <body>
    <%!
         Table sqltab;
         SqlBuilder sqlObj;
    %>
    <%
         String dofc = "",subject="",suggestion = "",docsrno="",actions="";
         String pick_button = "",locateid = "",employid="",url="";
         String employeeid="";
         String tabname=" ";
         boolean success = false;
         ResultSet rs= null;
    %>
    <%
         employid = (String) session.getAttribute("empid");
         locateid = (String) session.getAttribute("locationid");
         Employee empobj = Employee.getEmployee(employid);
         DateUtil dateform = new DateUtil(locateid);
         actions = request.getParameter("actions");
         pick_button = request.getParameter("DECISION");
         System.out.println("ACTION"+actions);
         System.out.println("pick_button"+pick_button);
    %>     
    <body>
    <%
         if(actions.equals("create")){
              if(pick_button == null){
    %>     
                   <form name="form1" method="post" action="../HRFiles/Suggestions.jsp">
                        <input type="hidden" name="actions" value="<%=actions%>">
                   <div class="page_heading">Suggestion Box</div><br>
                   <table>
                        <tr><th>From:</th><td><%=empobj.getFullName()%></td></tr>
                        <tr><th>Dated:</th><td><%=dateform.getToday()%></td></tr>
                        <tr><th>Subject</th><td><QuinnoxTags:TextBox type="text" name="subject" maxLength="65" required="true" value=" " label="Subject"/></td></tr>
                        <tr><th colspan="2">Suggestion:</th></tr>
                        <tr><td colspan="2"><QuinnoxTags:TextBox name="suggestion" type="textarea" cols="60" rows="13" required="true" value=" " label="Suggestion" maxLength="250"/></td></tr>
                   </table><br>
                   <table>
              <tr>
                   <td align="right">
                        <input type="submit" name="DECISION" value="Submit" class="button">
                   </td>
              </tr>
         </table>
                   <input type="hidden" name="empid" value="<%=employid%>"
                   <jsp:include page="../masters/flow.jsp" flush="true">
                        <jsp:param name="CREATOR" value="true"/>
                        <jsp:param name="TABNAME" value="SUGGESTION_WKFLOW"/>
                   </jsp:include>               
    <!--               <table>
                        <tr><td align="right"><input type="submit" name="submit" value="Submit" class='button'></td></tr>
                   </table>-->
              </form>
    <%
              else{
                   dofc          = dateform.getTodayMillis()+"";
                   subject          = request.getParameter("subject");          
                   suggestion     = request.getParameter("suggestion");
                   tabname =request.getParameter("TABNAME");          
                   // insert into SUGGESTIONS
                   // generate key
                   IDs idObj = IDs.getIDs();
                   docsrno = idObj.getId("SUGGESTIONID");
                   sqlObj=new SqlBuilder("SUGGESTIONS");
                   sqlObj.setColumn("DOCSLNO",docsrno);
                   sqlObj.setColumn("EMPID",employid);
                   sqlObj.setColumn("DOFC",dofc);
                   sqlObj.setColumn("DOFCZONE",locateid);
                   sqlObj.setColumn("SUBJECT",tabname);
                   sqlObj.setColumn("SUGGESTION",suggestion);
    //          System.out.println("empid is "+request.getParameter("empid"));
                   System.out.println("empid is "+employid);
                   success = sqlObj.set(SqlBuilder.INSERT);
    %>                         
                   <jsp:include page="../masters/flow1.jsp" flush="true">
                        <jsp:param name="DECISION" value="<%=request.getParameter(com.syntaxsoft.admin.WorkFlow.DECISION)%>" />
                        <jsp:param name="empid" value="<%=request.getParameter(\"empid\")%>" />
                        <jsp:param name="VIEWLEVEL" value="<%=request.getParameter(com.syntaxsoft.admin.WorkFlow.VIEWLEVEL)%>" />
                        <jsp:param name="VIEWERID" value="<%=request.getParameter(com.syntaxsoft.admin.WorkFlow.VIEWERID)%>" />
                        <jsp:param name="COMMENTS" value="<%=request.getParameter(com.syntaxsoft.admin.WorkFlow.COMMENTS)%>" />
                        <jsp:param name="DOCSLNO" value="<%=docsrno%>"/>
                        <jsp:param name="CREATOR" value="true"/>
                        <jsp:param name="TABNAME" value="<%=request.getParameter(\"TABNAME\")%>" />
                        <jsp:param name="MASTER_TABLE" value="SUGGESTIONS" />
                   </jsp:include>
                   <jsp:include page="../includes/redirectInclude.jsp" flush="true">
                        <jsp:param name="url" value="../HRFiles/ViewSuggestion.jsp?flag=empview" />
                   </jsp:include>
    <%
              } // end of if(pick_button == null)
         } // end of if(actions == create)
         if(actions.equals("select")){
              rs = sqltab.select("select * from SUGGESTIONS");
              if(rs.next()){
    %>
                   <div class="page_heading">List of Suggestions</div><br>
                   <table>
                        <tr>
                             <th>Employee Id</th>
                             <th>Employee Name</th>
                             <th>Suggestion Date</th>
                             <th>Subject</th>
                        </tr>
    <%          
                   do{
                        docsrno = rs.getString("DOCSLNO");
                        employeeid = rs.getString("EMPID");
                        dofc = rs.getString("DOFC");
                        subject = rs.getString("SUBJECT");
                        Employee empobj1 = Employee.getEmployee(employeeid);
                        url = "../HRFiles/Suggestions.jsp?actions=view&docsrno="+docsrno;
    %>
                        <tr>
                             <td><a href="<%=url%>"><%=employeeid%></a></td>
                             <td><a href="<%=url%>"><%=empobj1.getFullName()%></a></td>
                             <td><a href="<%=url%>"><%=dateform.getDate(dofc)%></a></td>
                             <td><a href="<%=url%>"><%=subject%></a></td>
                        </tr>                    
    <%               
                   }while(rs.next());
              } // end of if
         } // end of if(actions == select)
         if(actions.equals("view")){
              docsrno = request.getParameter("docsrno");
              rs = sqltab.select("select * from SUGGESTIONS where DOCSLNO='"+docsrno+"'");
              if(rs.next()){
                   do{
                        docsrno = rs.getString("DOCSLNO");
                        employeeid = rs.getString("EMPID");
                        dofc = rs.getString("DOFC");
                        subject = rs.getString("SUBJECT");
                        suggestion = rs.getString("SUGGESTION");
                   }while(rs.next());
              } // end of if()
              Employee empobj2 = Employee.getEmployee(employeeid);
    %>
              <div class="page_heading">Suggestion Box</div><br>
              <table>
                   <tr><th>From:</th><td><%=empobj2.getFullName()%></td></tr>
                   <tr><th>Dated:</th><td><%=dateform.getDate(dofc)%></td></tr>
                   <tr><th>Subject</th><td><%=subject%></td></tr>
                   <tr><th colspan="2">Suggestion:</th></tr>
                   <tr><td colspan="2"><textarea name="suggestion" cols="70" rows="10" readonly><%=suggestion%></textarea></td></tr>
              </table><br>
              <table>
                   <tr><td colspan="4" align="right">Back</td></tr>
              </table>
    <%     
         } // end of if(actions == view)
    %>
    </body>
    </html>
    rgds

    The problem is that you are trying to do a forward somewhere when output has already been sent to the browser: this is not allowed. I cannot find it in your code, so it must be in one of the includes.

  • New to the Apple and I want to set up a user account that will not delete the guest users files and allow and preserve their personal settings after log out. Is this possible?

    New to the Apple and I want to set up a user account that will not delete the guest users files and allow and preserve their personal settings after log out. Is this possible?

    The built-in guest user account will not do this. Simply create a new standard account and call it "Guest" or "Guest Users" or whatever you like.
    Go to System Preferences > Users& Groups, click "+" to make a new account.

  • After logging out of mozilla firefox i cannot log back in to mozilla firefiox , why ?

    after logging out of Mozilla Firefox
    I can't log back in
    why ?
    please help me

    This just happened to me too. But I've been on iTunes Match for several months now. I've had the problem several times before where ITM says something's "not available at this time; try again later," and at those times I've had to sign out of my iTunes Store account and back in for ITM to work again.
    But this time, when I tried to turn on iTunes Match again, I got this error (on my screen right now):
    iTunes match is matching a library from another computer. Only one library can be matched at a time. If you continue, the other iTunes Match session will be stopped and this computer's library will be matched instead. Buttons: [Cancel] [Match this computer]
    Well, I surely do NOT want to "Match this computer", as I have several thousand songs in iCloud that are NOT on this computer!
    What is going on???

  • Why I cannot open the application that I already installed on my mac. It's appears for a moment on the dock,but suddenly disappear again. I installed PES 2012, and my mac is pro with OS 10.6.8. Anyone could solve this problem please?

    I installed PES 2012 on my mac. It succeed, but when I click it in order to open it, the apps appear just for a moment on the dock then suddenly disappear. I'm using Mac Pro OS 10.6.8.

    Usually that means it's not compatible, likely a 10.5 program and Rosetta can't run it or it's not there, you need to check with Konami, they have a community forum/support there to answer your questions
    Check the operating system and machine requirements with them, perhaps there is a update or a patch you need to install to get it to work.
    https://www.konami.com/games/pes2012
    If that isn't a help, all checks out, then come back here as it's likely a OS X issue after that.

  • GDM cannot login after logging out.

    I have configured autologin for my account. It works when I restart/startup. But when I logout, and try re-login (with my account configured for autologin), it "hangs" for awhile then goes back to use selection, just like described in https://bbs.archlinux.org/viewtopic.php?pid=1211651. Then I try logging in using "Not listed", and enter my username, it gives "Invalid UTF-8"
    Last edited by jiewmeng (2013-01-06 08:49:07)

    hmm. make sure the login window is using the correct keyboard layout. while logged in, go to system preferences->accounts->login options and check the box to show input menu at the login window. then log out and verify that the correct keyboard layout is being used. that's the only thing i can think of that could be causing something like this.
    Message was edited by: V.K.

  • I can't imassage from my original imessage email it says its in use already. how can i log out from other devices ?

    ......

    The idea to jumpstart by change was not the smartest one, but gives you an opportunity to use that "temporary" account as permanent. You do not have a choice cause obviously despite you thinking that old account is no more -it does exist on Apple servers. And if you are unwilling to share your [email protected] with friend, just create one extra [email protected] for your friend. One suggestion - do not use gmail.

  • Beating Akamai timeout & Response Already Committed exception

    Hi Gurus,
    Have an interesting scenario. To cut the long story short, in our scenario, the browser requests are routed to our server through Akamai, which is a 3rd party array of servers that are spread over geographies and cache static content, in order to ensure the request is routed through the nearest Akamai server to our WLS server. Akamai timeout threshold is maxed at 15 minutes. One of our transactions are time intensive and runs between 20-25 minutes. As you would have guessed, the connection is idle until process completes, akamai timeout is kicking in and closing the connection. Hence browser throws a javascript alert saying 'A connection to the server has failed'.
    Q) So, the direct question is, is there a mechanism in ADF to send heartbeat or ping signal to the browser periodically so that the connection will be kept open.
    We built a simple POC and beat Akamai timeout, by spawning a thread on server side that keeps writing a heartbeat signal something like "<!-- heartbeat -->" into ServletOutputStream periodically, just before invoking the long-running-proces. We could successfully beat Akamai timeout, but the problem is finally when the long-running-process completes and ready to proceed with rest of lifecycle, it fails with the popular exception "Response that is already committed". Though the error can be prevented by ctx.responseComplete(), it throws a blank page.
    Couple of things puzzling us:
    1) Why not simple ADF continue with rest of lifecycle phases and write to the same outputstream , in which case "response already committed" exception will not happen
    2) Is ADF internally doing any redirect ? Because it is a command button (Non-PPR) that initiates the entire call.
    3) Any other suggestions or best approaches or tweaks are appreciated
    JDEV Version: 11.1.1.3
    Code snippet is as follows:
            FacesContext ctx = FacesContext.getCurrentInstance();
            HttpServletResponse resp = (HttpServletResponse)ctx.getExternalContext().getResponse();
            HttpServletRequest req = (HttpServletRequest)ctx.getExternalContext().getRequest();
            ServletOutputStream out;
            hbThread = new HeartBeatThread();
            Object result = null;
            try {
                out = resp.getOutputStream();
                 hbThread.setOut(out);
                OperationBinding binding = ADFUtils.getOperationBinding("copyQuoteStub");
    // -- heartbeat thread started
                 hbThread.start();
    // -- Long running process invoked
                result = binding.execute();
    // -- Long running process ended
    // -- heartbeat thread stopped
                hbThread.stop();
       ctx.responseComplete();Heartbeat thread code:
          public void run() {
              while(sendHeartbeat) {
                    try {
                        System.out.println("...............BKB::Heartbeat Thread heartbeat " + new Date());
                        out.write(heartbeatSignal.getBytes());
                        out.flush();
                        Thread.currentThread().sleep(1000);
                    } catch (Exception e) {
                        e.printStackTrace();
          }Thanks a ton
    Srini
    Edited by: sangara on Mar 21, 2013 8:45 PM

    Sorry to bump it up, but just wanted to make sure it is not buried and get unnoticed as there are many threads posted later.

  • Jsp:forward failed with 'Response already committed'

    I got a "Response already commited" error when using logic:forward or jsp:forward inside a JSP page fragment that is part of a Struts Tiles layout.
    Here is the code fragment included in the layout.jsp.
    <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
    <logic:notPresent name="user" scope="session">
         <logic:forward name="login" />
    </logic:notPresent>
    Here is the error message:
    [ServletException in:/WEB-INF/tiles/verifyLogin.jsp] Exception forwarding for name login: java.lang.IllegalStateException: Cannot forward. Response already committed. (Servlet 2.3, SRV 8.4)'

    Jsp normally buffers output in a 8k buffer and write it to the output stream (i.e. "commits") it when:
    1) it is explicitly flushed
    2) the buffer overflow
    3) an jsp include is invoked
    My code is in a layout.jsp file which is referenced in a tiles-definition. The tiles definition is tiles:inserted in a top-level jsp file. I am not sure if tiles uses jsp:include or if there is a way to get jsp:foward to work in the layout.jsp.

  • WAS 6.0 - Response already committed / OutputStream already obtained

    Hello, we have struts code that is working fine in websphere 5, but not 6. I've seen this same kind of thing being post around, but haven't found one that closely resembles our simple setup. Below I've copied what our code looks like. Please help me to understand what the least-intrusive way would be to fix something simple like this, and let me know if more info is needed. FYI, we have tried returning null from the class, but this doens't seem to work. Also, some additional info is that we need this to work in WAS 5 and 6, because we have two different apps containing the same code, one of which is deployed (via EAR file) on 5 and the other 6. Thanks!
    struts-config entry:     
    <action path="/streamFile" type="MyClass" scope="request" validate="false">
                  <forward name="success" path=""/>
    </action>     
    web.xml entry:
         <servlet-mapping>
              <servlet-name>opsconsoleServlet</servlet-name>
              <url-pattern>streamFile</url-pattern>
         </servlet-mapping>
    Snippet of Class file:
    public class MyClass extends Action {
         public ActionForward execute(ActionMapping mapping,
                         ActionForm form,
                        HttpServletRequest request,
                        HttpServletResponse response)
              throws Exception {    
         ServletOutputStream out = response.getOutputStream();
         BufferedOutputStream bos = null;
         try {
                   bos = new BufferedOutputStream(out);
                    bos.write(<bytes, etc>);
         } catch(final MalformedURLException e) {
         throw e;
         } catch(final IOException e) {
         throw e;
         } finally {
         if (bos != null)
              bos.close();
         if (out != null)
              out.close();
         return mapping.findForward("success");
    error from log:
    [11/5/07 12:50:11:737 EST] 00000036 ServletWrappe E   SRVE0014E: Uncaught service() exception root cause FilterProxyServlet: Cannot forward. Response already committed.
    [11/5/07 12:50:12:001 EST] 00000036 ServletWrappe E   SRVE0068E: Could not invoke the service() method on servlet opsconsoleServlet. Exception thrown : javax.servlet.ServletException: Cannot forward. Response already committed.
            at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:157)
            at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:82)
    error later in log:
    [11/5/07 12:50:12:621 EST] 00000036 SRTServletRes W   WARNING: Cannot set status. Response already committed.
    [11/5/07 12:50:12:627 EST] 00000036 SRTServletRes W   WARNING: Cannot set header. Response already committed.
    [11/5/07 12:50:14:191 EST] 00000036 ServletWrappe A   SRVE0242I: [Communication] [/OpsConsole] [/WEB-INF/jsp/error/internalError.jsp]: Initialization successful.
    [11/5/07 12:50:14:201 EST] 00000036 ServletWrappe E   SRVE0068E: Could not invoke the service() method on servlet /WEB-INF/jsp/error/internalError.jsp. Exception thrown : java.lang.IllegalStateException: SRVE0199E: OutputStream already obtained
            at com.ibm.ws.webcontainer.srt.SRTServletResponse.getWriter(SRTServletResponse.java:490)
            at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:170)
            at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:163)
            at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:227)

    svguerin3 :
    So this is something that worked in websphere 5 but not 6.. Are you sure this same code working on WAS5? This shouldn't. I guess you are trying to display the contents of the stream in a JSP page.If that's correct don't use
    ServletOutputStream out = response.getOutputStream();
         BufferedOutputStream bos = null;
         try {
                   bos = new BufferedOutputStream(out);
                    bos.write(<bytes, etc>);
         }instead read the bytes in to an in memory object, add this in memory object to request param and then call findForward(). In the JSP page get this request attribute and do whatever you want.
    Note: You can either use servletoutstream.write or RequestDispactcher.forward/redirect/response.sendRedirect.

  • Apache JBoss [Response already commited]

    Hi
    I have a problem. This problem started about a 5 days ago on the server. I am running JBoss 4.0.1 and struts. with apache 2.
    Now everytime a user accesses any of my jsp pages or actions, on the server this message apears.
    [JkCoyoteHandler] Response already commited.And after about an hour the server goes down due to memory leak. It throw OutOfMemoryException.
    What I have done so far:
    1- First I stopped apache and started the jboss server. using jmeter I tested my application with 5000 concurrent hit per minute. The server was alive an working.
    2- Then I started apache back, and this time I tested the application through apache (domain name, instead of ip address and port), it failed immediately.
    Intersting huh?
    3- Then I looked at my apache config file, it is like:
        DocumentRoot /usr/share/jboss-4.0.1RC1/server/default/deploy
        JkMount /* jboss
        RewriteEngine on
        RewriteCond %{HTTP_HOST} ^www.xxx.com$
        RewriteCond %{REQUEST_URI} !^/context1/ [NC]
        RewriteRule ^(.*)$ /context1/$1 [R,L]
    </VirtualHost>
    <VirtualHost *:80>
        ServerName www.xxx.com
        DocumentRoot /usr/share/jboss-4.0.1RC1/server/default/deploy
        JkMount /* jboss
        RewriteEngine on
        RewriteCond %{HTTP_HOST} ^xxx.com$
        RewriteCond %{REQUEST_URI} !^/context1/ [NC]
        RewriteRule ^(.*)$ /context1/$1 [R,L]
    </VirtualHost>
    <VirtualHost *:80>
        ServerName booboo.xxx.com
        DocumentRoot /usr/share/jboss-4.0.1RC1/server/default/deploy
        JkMount /* jboss
        RewriteEngine on
        RewriteCond %{HTTP_HOST} booboo.xxx.com
       RewriteCond %{REQUEST_URI} !^/context2/ [NC]
        RewriteRule ^(.*)$ /context2/$1 [R,L]
    </VirtualHost>
    <VirtualHost *:80>
        ServerName bug.xxx.com
        DocumentRoot /srv/www/htdocs/bugzilla
        DirectoryIndex index.cgi
        <Directory /srv/www/htdocs/bugzilla>
            AddHandler cgi-script .cgi
            Options +Indexes +ExecCGI
            DirectoryIndex index.cgi
            AllowOverride Limit
        </Directory>
    </VirtualHost>
    </IfModule>What is wrong?
    Cheers and thanks

    no answers? apearently we have no experts in this area?

Maybe you are looking for