PageContext.forward("NewPage.jsp") appends previous page's data

Hi!
          When I try to use the above mentioned forward, I get to NewPage.jsp, but
          all of the data from OldPage.jsp is appended to the bottom of the
          NewPage. I have tried using requestDispatcher.forward() as well with the
          same results. How should I do this?
          Weblogic 5.1 with SP 6 on Solaris.
          thanks
          Colleen
          

OOPS and I forgot to mention that this is in a custom tag, not just on the
          jsp page.
          Colleen Wtorek wrote:
          > Hi!
          >
          > When I try to use the above mentioned forward, I get to NewPage.jsp, but
          > all of the data from OldPage.jsp is appended to the bottom of the
          > NewPage. I have tried using requestDispatcher.forward() as well with the
          > same results. How should I do this?
          >
          > Weblogic 5.1 with SP 6 on Solaris.
          >
          > thanks
          > Colleen
          

Similar Messages

  • JSP page and the pageContext.forward() method

    I am running JSP pages on a coldfusion site so that a CF page (i.e. login.cfm) hosts my login.jsp page. I want to reload the JSP page without having to reload the cfm page each time. pageContext.forward() does do this, however, it only forwards on to a new page. I want to be able to reload a page with the new URL parameters (e.g. when there is an error, login.jsp will reload and give the user an error). What is a method to reload the page with the proper URL variables?
    The following code does not work:
    pageContext.forward("login.jsp?operation=user_edit&jsessionid=" + f_URLEncode(session.getId()));
    Because it runs from the login.jsp page (the forward command only goes to a new page)

    Just to clarify...
    I log into your site. The first page shown is the CF page. The CF page automatically redirects me to the JSP page. Then what, exactly?
    Does the login page automatically determine my URL, attempt to validate it, and if it doesn't work, it reloads the page?
    The reason I ask is because there is a difference between the resulting HTML page and the JSP class file that generates that HTML page. Generally speaking, most web servers, particularly Tomcat, do not recompile the JSP class file, they just simply pass the parameters to the existing class file, and a new HTML page is generated.
    So technically speaking, every time you visit the login.jsp page, you will get a brand new HTML page. The contents of that page are the same because you presumably pass the same parameters to the class which hasn't changed. But in other words, no, you can't forward to an "old" page that was previously generated by the class - each time the web server calls that class, it creates a "new" page.
    Or are you saying that every time you attempt to forward to the login.jsp page, the system erronously calls the CF page instead?

  • PageContext.forward vulnerability?

    Hi everybody,
    I've a problem in using the pageContext.forward() function with parameters.
    Suppose to have such source code in a jsp page:
    <%
    String ATTACH = "../../WEB-INF/classes/myclass.class";
    if (true) {
         pageContext.forward("/example.jsp?ID=" + ATTACH);
         return;
    %>Changing the page example.jsp with any other existing page and the parameter ID with any other parameter
    name the result doesn't change: the server (in my configuration Tomcat 5.5.9) sends the client the byte-code
    of myclass.class! In fact the page example.jsp is never called! Is this correct?
    Thanks,
    Loris

    Tomcat Security Team recognized this issue as an important vulnerability that affects Tomcat 4.x, 5.x, 6.x.
    Here are the references:
    http://nvd.nist.gov/nvd.cfm?cvename=CVE-2008-2370
    http://tomcat.apache.org/security-6.html
    Information disclosure - CVE-2008-2370
    When using a RequestDispatcher the target path was normalised before the query string was removed. A request that included a specially crafted request parameter could be used to access content that would otherwise be protected by a security constraint or by locating it in under the WEB-INF directory.
    Thanks,
    Loris

  • How can I get the "pageContext" object in jsp page?

    Hi everyone:
    I want to get struts's DataSource object in jsp page.So I should get the PageContext object in jsp page.My code is:
    ///////////////////datatest.jsp///////////////////////////////////
         DataSource ds=(DataSource)pageContext.getAttribute(Action.DATA_SOURCE_KEY);
         conn=ds.getConnection();
              stm=conn.createStatement();
              rs=stm.executeQuery(insertsql);
    Is right?But I get the "NullPointerException" error in Tomcat.The connection pool in struts-config.xml is:
    <data-sources>
    <data-source key="mydatasource">
    <set-property property="autoCommit"
    value="false"/>
    <set-property property="description"
    value="MyWebSite Data Source Configuration"/>
    <set-property property="driverClass"
    value="org.gjt.mm.mysql.Driver"/>
    <set-property property="maxCount"
    value="4"/>
    <set-property property="minCount"
    value="2"/>
    <set-property property="password"
    value="qijiashe"/>
    <set-property property="url"
    value="jdbc:mysql://localhost:3306/myweb"/>
    <set-property property="user"
    value="lyo"/>
    </data-source>
    </data-sources>
    I can query the database in servlet.
    I think the method that I get the context is not right.Had someone get the pagecontext in jsp page?help :(

    Sorry I forgot that I had change the code:
    DataSource ds=(DataSource)pageContext.getAttribute(Action.DATA_SOURCE_KEY);
         conn=ds.getConnection();
              stm=conn.createStatement();
              rs=stm.executeQuery(insertsql);
    to the code:
    DataSource ds=(DataSource)pageContext.getAttribute("mydatasource");
         conn=ds.getConnection();
              stm=conn.createStatement();
              rs=stm.executeQuery(insertsql);
    mydatasource is the struts datasource in "struts-config.xml". I couldn't work

  • Creating a template in Pages is straight-forward as answered here previously. Is there and equivalent for iBooks Author which can start with a blank page and build up the template as required? or can one only adapt a ready made template?

    Creating a template in Pages is straight-forward as answered here previously. Is there an equivalent for iBooks Author which can start with a blank page and build up the template as required? or can one only adapt a ready made template? This has proved unsatisfactory to me so far. Lines are left in etc.

    There are two basic menus for fonts - one from the main menu bar and one from the toolbar. You can also bring up the font manage dialog.
    I don't recommend trying to hard to force an otherwise foreign font, as it inevitably needs to be usable/supported on iOS as well, and that can get tricky w/3rd party fonts, as an example, even with the expanded font support in the latest iBA.
    If you need to discuss fonts more, I suggest starting a new thread....preferably with a slightly more brief title, thanks.

  • How to remember previous page in a JSP page that's reloaded

    I have a JSP page where i want a "back" link that brings me back to the previous page. The problem is, some actions on this page will call a servlet that reloads my page, so using history.back() brings me back to the previous version of the same page.
    What is a good way to solve this in a servlet/JSP application?

    I just wrote a simple bean with a few methods that i frequently use.
    the bean is session scope, and you just call something like
    setCurrentPagePath(), and you build your link up by calling getCurrentPagePath()
    before settings the new one.

  • Previous Page's URL in JSP/JSTL

    Dear Sirs,
    Could you please advice me how I could get the previous page's url( ie, the page the the user was visting before coming to the current page) in JSP/JSTL..
    Thank you in advance

    You mean the referrer? You can just get it from the HTTP header.
    String referrer = httpServletRequest.getHeader("referer"); // Yes, with the legendaric misspelling.

  • How to forward a JSP page to another dynamically generated JSP

    Hi gurus,
    I have a problem with forwarding a JSP page, to another dynamic jsp page.
    I have to forward a jsp page to (say X1 ) to another JSP page (say X2).
    Iam choosing the name of the page X2, dynamically from a list of JSP pages in a directory depending upon some parameters.
    Here is my code for ur better understanding...
    <java>
    // this gives me the name of the page X2 to which my page X1 should be forwarded.
    <TR> <TD><%=request.getParameter("codeins")%></TD></TR>
    <%
    if(request.getParameter("codeins").length() != 0)
    %>
    // if i use this forward tag i get the error
    <a href=" 
                <jsp:forward page=Ins/<%=request.getParameter("codeins")%">.jsp">
         <jsp:param name="a" value="<%=request.getParameter("a")%>" />     
         <jsp:param name="b" value="<%=request.getParameter("b")%>" />
         <jsp:param name="c" value="<%=request.getParameter("c")%>" />
         <jsp:param name="p" value="<%=request.getParameter("p")%>" />
         <jsp:param name="q" value="<%=request.getParameter("q")%>" />
    </jsp:forward>">GNSS Instantiation</a>
    <%
    else {
    out.println("No entry in the database! ");
    } %>
    </java>
    I am getting the exceptions like
    <java>
    org.apache.jasper.JasperException: /Newspg.jsp(162,67) equal symbol expected
         at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:94)
         at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:428)
         at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:126)
         at org.apache.jasper.compiler.Parser.parseAttribute(Parser.java:169)
         at org.apache.jasper.compiler.Parser.parseAttributes(Parser.java:136)
         at org.apache.jasper.compiler.Parser.parseForward(Parser.java:517)
         at org.apache.jasper.compiler.Parser.parseAction(Parser.java:661)
         at org.apache.jasper.compiler.Parser.parseElements(Parser.java:803)
         at org.apache.jasper.compiler.Parser.parse(Parser.java:122)
         at org.apache.jasper.compiler.ParserController.parse(ParserController.java:199)
         at org.apache.jasper.compiler.ParserController.parse(ParserController.java:153)
         at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:227)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:369)
         at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:473)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:190)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:432)
         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:356)
         at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:430)
         at org.apache.jsp.SPVariablesg_jsp._jspService(SPVariablesg_jsp.java:425)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:193)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:781)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:549)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:589)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:666)
         at java.lang.Thread.run(Thread.java:534)
    </java>
    please help me out to let me know, where iam doing wrong.
    Thanx
    mark.

    Hi,
    in reference to the above subject i did like to know what is wrong in the following code of mine:
    <%
         String name = "admin"; // this is line which is being indicated in error message
         int password = 4589;
    %>
    <!-- <script language="javascript" src="init.js"></script> -->
    <head>
    <script>
    function checking()
         if name != document.test.user.value || password != document.test.password.value)
              alert("ur not authorised to view the requested url");
              forward("Firstpage.jsp");
    %>
    </script>
    its says :
    org.apache.jasper.JasperException: /webpg/Dec2Firstpage.jsp(4,21) equal symbol expected
    any solutions?
    thanx in advance

  • Next page previous page using JDBC in JSP

    Hello,
    I wanted to know how the previous page and next page is developed when an user serches for a particular string in a web site.They are restricting the database to display only 10-25 rec per page and giving an option like next, when an user clicks next the next 10-25 rec are shown how is this done.
    Please e-mail me the source code if availabale to [email protected]
    Thanks in advance
    Anu
    null

    Hi Anu,
    visit technet.oracle.com site, go to sample section, in that choose JDBC section, here you will find example similar to your problem which you have describe below -
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Anu:
    Hello,
    I wanted to know how the previous page and next page is developed when an user serches for a particular string in a web site.They are restricting the database to display only 10-25 rec per page and giving an option like next, when an user clicks next the next 10-25 rec are shown how is this done.
    Please e-mail me the source code if availabale to [email protected]
    Thanks in advance
    Anu
    <HR></BLOCKQUOTE>
    null

  • The back/forward button no longer has a drop-down list of previous pages visited in that tab: or is this accessible some other way?

    The question says it all, really. I just installed Firefox 4, and noticed a significant (for me) reduction in utility: in the previous version, the back button used to have a drop-down arrow which showed the previous pages visited in a particlular tab, and allowed you to go back several pages in one go, if you wanted to (say, when browsing a series of sites to buy something or other). Firefox 4 no longer has this facility, which I personally found very useful from time to time.
    Is it available by some other means? If not, maybe I should consider reverting to the previous version, which suited me better, in this regard at least.

    Just put the little arrow back into the system. Fix this now. I don't want 2 other options. Get this right for "nontech" people.

  • Randomly going forward or back through previous/next pages

    Browser random goes forward/back through prev/next pages. No malware detected, using Windows Security Essentials, up to date.

    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do not click the Reset button on the Safe mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    Create a new profile as a test to check if your current profile is causing the problems.
    See "Creating a profile":
    *https://support.mozilla.org/kb/profile-manager-create-and-remove-firefox-profiles
    *http://kb.mozillazine.org/Standard_diagnostic_-_Firefox#Profile_issues
    There may be extensions and plugins installed by default in a new profile, so check that in "Tools > Add-ons > Extensions & Plugins" in case there are still problems.
    If the new profile works then you can transfer some files from the old profile to that new profile, but be careful not to copy corrupted files.
    See:
    *http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox
    You can also try to reset Firefox:
    *https://support.mozilla.org/kb/Basic+Troubleshooting

  • How to get next and previous page  in a Train Flow .

    Hi,
    For creating record I am using multi-step flow (train).
    I have three page and I want to navigate the page via multi-step flow (train).
    I followed the steps given in the Toolbox Tutorial of create purchase order and
    Locator Element: Page/Record Navigation in developer's guide.
    page1=/uttara/oracle/apps/uttaraimc/createcitizen/webui/PropertyCreatePG
    page2=/uttara/oracle/apps/uttaraimc/createcitizen/webui/HouseDetailsCreatePG"
    page3=/uttara/oracle/apps/uttaraimc/createcitizen/webui/EducationCreatePG"
    The page1 is navigated via 'Create' button in CitizenSearchPG
    Now on this Page1, when I clicks on the 'Next' button (to navigate to the next page in the same multi-step flow) I am getting following exception and its not navigating to page2.
    Error: Cannot Display Page
    You cannot complete this task because one of the following events caused a loss of page data:
    * You accessed this page using the browser's navigation buttons (the browser Back button, for example).
    * Your login session has expired.
    * A system failure has occurred.
    To proceed, please select the Home link at the top of the application page to return to the main menu. Then, access this page again using the application's navigation controls (menu, links, and so on) instead of using the browser's navigation controls like Back and Forward.
    Here is the code for CreateFooterCO,
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    OANavigationBarBean navBean =
    (OANavigationBarBean)webBean.findChildRecursive("NavBar");
    if (navBean == null)
    MessageToken[] tokens = { new MessageToken("OBJECT_NAME", "NavBar") };
    throw new OAException("AK", "FWK_TBX_OBJECT_NOT_FOUND", tokens);
    // Determine which page we're on so we can set the selected value. Each
    // time we navigate to and within the flow, the URL includes a parameter
    // telling us what page we're on.
    int step = Integer.parseInt(pageContext.getParameter("ccStep"));
    navBean.setValue(step);
    // Figure out whether the "Submit" button should be rendered or not;
    // this should appear only on the final page (Step 3).
    OASubmitButtonBean submitButton =
    (OASubmitButtonBean)webBean.findIndexedChildRecursive("Submit");
    if (submitButton == null)
    MessageToken[] tokens = { new MessageToken("OBJECT_NAME", "Submit") };
    throw new OAException("AK", "FWK_TBX_OBJECT_NOT_FOUND", tokens);
    if (step != 3)
    submitButton.setRendered(false);
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    int currentStep = Integer.parseInt(pageContext.getParameter("ccStep"));
    // This button should only be displayed on the final page...
    if (pageContext.getParameter("Submit") != null)
    // Simply telling the transaction to commit will cause all the Entity Object validation
         // to fire.
    // Note that you must commit before asking WF for the next page, because
    // asking for the next page at this point will transition the WF to a
    // completed state, which means you won't be able to navigate back
    // if there are errors during the commit processing.
    am.invokeMethod("apply");
    TransactionUnitHelper.endTransactionUnit(pageContext, "citizenCreateTxn");
    // Don't forget to call this even on the last page so the activity associated with
    // this page completes and the Workflow transitions appropriately.
    String nextPage = OANavigation.getNextPage(pageContext);
    // For the final page, Workflow should be returning null -- and the user
    // can select the "Submit" button only on the last page. Something's
    // wrong.
    if (nextPage != null)
    throw new OAException("AK", "FWK_TBX_T_WF_UNEXPECTED_TRANS");
    else // we've just completed the flow
    // Assuming the "commit" succeeds, we'll display a Confirmation dialog that takes
         // the user back to the main "Purchase Orders".
    /* String poNumber = (String)pageContext.getTransactionValue("PO_NUMBER");
    MessageToken[] tokens = { new MessageToken("PO_NUMBER", poNumber),
    new MessageToken("PO_APPROVER", pageContext.getUserName()) };
    OAException confirmMessage = new OAException("AK", "FWK_TBX_T_PO_CREATE_CONFIRM", tokens);
    OADialogPage dialogPage = new OADialogPage(OAException.CONFIRMATION,
    confirmMessage,
    null,
    pageContext.getApplicationJSP() + "?OAFunc=FWK_TOOLBOX_PO_SUMMARY_CR&retainAM=Y",
    null);
    pageContext.redirectToDialogPage(dialogPage);
    else if ("goto".equals(pageContext.getParameter(EVENT_PARAM)) &&
    "NavBar".equals(pageContext.getParameter(SOURCE_PARAM)))
    // Note that the OANavigationBean publishes a "goto" event paremeter when
    // either the Back or Next button is pressed. You need to determine which way to
    // go based on the related "value" parameter.
    // Also note the check of "source" above to ensure we're dealing with the
    // page-level navigation here and not table-level navigation which is
    // implemented with the same Bean configured differently.
    int target = Integer.parseInt(pageContext.getParameter("value"));
    String workflowResult;
    if (target < currentStep)
    workflowResult = "PREVIOUS";
    else
    workflowResult = "NEXT";
    String nextPage = OANavigation.getNextPage(pageContext, workflowResult);
    if (nextPage != null)
    HashMap params = new HashMap(1);
    params.put("ccStep", IntegerUtils.getInteger(target));
    pageContext.setForwardURL(pageContext.getApplicationJSP() + "?" + nextPage, // target page
    null,
    KEEP_MENU_CONTEXT,
    "", // No need to specify since we're keeping menu context
    params, // Page parameters
    true, // Be sure to retain the AM!
    ADD_BREAD_CRUMB_NO, // Do not display breadcrumbs
    OAException.ERROR); // Do not forward w/ errors
    else
    throw new OAException("AK", "FWK_TBX_T_WF_NO_NEXT_PAGE");
    else if (pageContext.getParameter("Cancel") != null)
    am.invokeMethod("rollbackCitizenInfo");
    // Remove the "in transaction" indicator
    TransactionUnitHelper.endTransactionUnit(pageContext, "citizenCreateTxn");
    pageContext.forwardImmediately("OA.jsp?page=/uttara/oracle/apps/uttaraimc/createcitizen/webui/CreateCitizenSearchPG",
    null,
    OAWebBeanConstants.KEEP_MENU_CONTEXT,
    null,
    null,
    true, // retain AM
    OAWebBeanConstants.ADD_BREAD_CRUMB_NO);
    How to resolve this issue?
    please suggest.
    Thanks & Regards,
    Sagarika

    Sagarika,
    Please go thru the dev guide which explains the train flow in the multistep update exercise. Compare the steps with ur implementation.
    - Senthil

  • How to go back to previous page

    I have two JSP pages first.jsp and second.jsp the user starts at first.jsp and clicks the submit button which then takes the user to second.jsp where the users information is saved in a database. I want to know how to go back to first.jsp from second.jsp after the users info has been saved? I have been able to get the previous pages url information put I don't know what to do with it. I know there is a jsp:forward but don't think this can help me. PLEASE someone help me I am stuck and need to move forward.
    thank you

    Why do you think that jsp:forward will not fit your requirement? An alternative is to use sendRedirect()

  • Strange pageContext.forward Error

    Hello,
    We're migrating from Weblogic 10 to 11g1 using MyFaces 1.2.
    And have encountered with one JSF page with pageContext.forward problem.
    java.lang.IllegalStateException
         at org.apache.myfaces.application.jsp.ViewResponseWrapper.getWriter(ViewResponseWrapper.java:140)
         at javax.faces.webapp._ErrorPageWriter.handleThrowable(_ErrorPageWriter.java:492)
         at javax.faces.webapp._ErrorPageWriter.handleException(_ErrorPageWriter.java:479)
         at javax.faces.webapp.FacesServlet.handleLifecycleException(FacesServlet.java:294)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:192)
         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.ServletStubImpl.execute(ServletStubImpl.java:184)
         at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:523)
         at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:253)
         at weblogic.servlet.jsp.PageContextImpl.forward(PageContextImpl.java:160)
         at jsp_servlet.__query._jspService(__query.java:180)
         at weblogic.servlet.jsp.JspBase.service(JspBase.java:35)
         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.ServletStubImpl.execute(ServletStubImpl.java:184)
         at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:523)
         at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:253)
         at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:341)
         at org.apache.myfaces.application.jsp.JspViewHandlerImpl.buildView(JspViewHandlerImpl.java:486)
         at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:337)
         at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
         at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:187)
         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:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:287)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:351)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at com.cht.morder.web.sessionFilter.doFilter(sessionFilter.java:396)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    The problem looks like MYFACES-1955
    https://issues.apache.org/jira/browse/MYFACES-1955
    But when I change the line from pageContext.forward to response.sendRedirect, it works.
    Anyone has also got this problem?
    Is it the problem of Weblogic like the discussion in MYFACES-1955?
    Thank you for your help.
    Edited by: user12024433 on 2011/11/21 下午 7:33

    Howdy,
    You've already written to you JSP output, and in this situation you can't forward 'cause it's automatically flushed.
    try changing your forward method position, befor any out.print() or like that.
    OR use this trick,
    <%@ page autoFlush="false" %>
    // Write to JSP and other stuffs...
    // Forward to another content...
    // Do your stuffs...
    response.flushBuffer();

  • What is the command for return to a previous page in java

    Hi,
    I need to customize a OK button that return to a previous page instead of forwarding other page? The best way is to extend the CO class? If yes, what is the command to do so please.
    Thanks,
    CY

    Hi CY,
    In which ever pages you are calling this page, extend controller of those pages and in PFR of that controller give the following code
    String s4 = pageContext.getCurrentUrlForRedirect();
    pageContext.putSessionValue("previousPageUrl", s4);
    then in your second page you can call this session variable by
    pageContext.getSessionValue("previousPageUrl");
    use this session value for page redirect.
    Reagrds
    jyothi

Maybe you are looking for

  • How to enable "On Exit" property for a Quiz Question?

    Maybe there is a better way of doing this, but I'm making a quick jeopardy game using Captivate 8, and I'm simply trying to get the board buttons/shapes to disappear after they have been clicked. I was using advanced actions where the first action wo

  • Iphone not being recognised by itunes, but being recognised as camera.

    I've updated everything, restarted my computer, restarted in services... it's being recognised as a camera folder, but not coming up in itunes. I need to download some apps using my computer, as my iphone has changed it's app store to China, but itun

  • Can I restore from Time Machine backup after replacing hard drive

    I'm planning on replacing the 250GB hard drive in my mid 2010 13 inch MBP with a larger one. My MBP comes with Snow Leopard, and I've installed Lion and recently Mountain Lion from App Store. Can I use my Snow Leopard disc to boot up the laptop after

  • Case of the Crashing MacBook...(Kernel inside)

    Hi all.  My MacBook Pro has just started randomly restarting again.  I thought I had this solved earlier by removing alot of drivers and programs others thought were causing it.  Looks like those didn't fix it.  It will randomly restart in the middle

  • Aa acting

    According to posting cycle, you should post period 012 next this is the error system showin when iam planning to run dep in the 01 for 2008 this how can i chnge to run dep to 01 2008