Help!!!why the flag " jsp:forward" don't work?

the code like this:
<%@page buffer="none" autoFlush="true" %> //attention: buffer="none"
<%
long i=0;
for(i=0;i<10;i++)
out.println("@@@@@@@@@@@@@@@@@");
%>
<jsp:forward page="test.jsp" />
but it not turn to the page "test.jsp".Why?

but it not turn to the page "test.jsp".Why? because of your page buffer being none.
According to the API:
forward should be called before the response has been committed to the client (before response body output has been flushed). If the response already has been committed, this method throws an IllegalStateException. Uncommitted output in the response buffer is automatically cleared before the forward.
Having a buffer of "none" means that any output you do is sent immediately, and is committed. So you can't forward/redirect after you start output.
Solution: give the page a buffer. Remove that page directive, and it should work.
Cheers,
evnafets

Similar Messages

  • Does anyone maybe know why the new Macbook pros don't have iWeb and how i can install it. My Macbook already came with the iLife thing, but it seems to only have iMovie, iPhoto and Garage Band. is there any way that i can install iWeb?

    Does anyone maybe know why the new Macbook pros don't have iWeb and how i can install it. My Macbook already came with the iLife thing, but it seems to only have iMovie, iPhoto and Garage Band. is there any way that i can install iWeb?

    Apple discontinued iWeb. That's the case for over a year now.
    Topics in this forum will tell you that in order to install iWeb you have to find a copy at eBay, Amazon and similar places.
    Or here

  • I recently bought a new macbook pro and set it up using the migration assistant and my mac mini.  I can't get the text message forwarding feature to work with both computers.

    I recently bought a new macbook pro and set it up using the migration assistant from my mac mini.  I can't get the text message forwarding feature to work with both computers.  It keeps saying that I only have 2 devices setup, my iPad and my macbook pro.  When I mess with the setting on my mac mini, it goes from saying that that is one of the devices to my macbook pro being the 2nd device.  I think that something happened as a result of my using the migration assistant and now it thinks that my macbook pro and my mac mini are one and the same computer.  Any ideas?

    Thanks, Sig.
    The old computer is a 2.6 Ghz Intel Core 2 Duo
    The new one is a 2.3 GHz intel core i7
    In going over this, thanks to "tallking it out" with you, I did discover the Text Edit problem.  Because I've still been unable to get the new computer text size (fonts or whatever) to match the old computer, I did not notice that the curser is now different--the line midway down the curser has to be placed on the line I am working upon, otherwise the edits go elsewhere on the page.  Now, with a bit of difficulty, I am able to get Text Edit to work correctly.
    If you have any ideas as to why my menu bar and Text Edit type are still so slow, I'd love to have them. 
    (I went through the process you suggested earlier, re my Trackpad preferences, and found no improvement.)

  • In my Ameritrade account the sub-header titles don't work when selected.

    In my Ameritrade account the sub-header titles don't work when selected. Is it maybe an add on or the beta version 14.01a of firefox or something else?
    I can't give the address as it is a confidential site, sorry. But for example when you pick trade and try to select buy or sell tab it does nothing. I tried downloading the lastest beta version 14.01a which I like to use but this didn't help? Thank you.

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • My macbook air will not connect to the internet due to a self assigned IP address. I have tried trawling the support forums, but either I can't understand the suggestions, or they don't work. Please explain to me in simplest terms how to fix this. Thanks!

    My macbook air will not connect to the internet due to a self assigned IP address. I have tried trawling the support forums for hours, but either I can't understand the suggestions, or they don't work. Please explain to me in simplest terms how I can fix this. Many thanks!

    The warranty entitles you to complimentary phone support for the first 90 days of ownership.
    If you bought the product in the U.S. directly from Apple (not from a reseller), you have 14 days from the date of delivery in which to exchange or return it for a refund. In other countries, the return policy may be different. If you bought from a reseller, its return policy applies.

  • Hi, I have a problem wih Photoshop. I am trying to press the buttons but they don't work at all. Also the program are not closed. How can i fix this? FYI, Illustrater is working normally.

    Hi, I have a problem wih Photoshop. I am trying to press the buttons but they don't work at all. Also the program are not closed. How can i fix this? FYI, Illustrater is working normally.

    You have not provided any useful technical information like system specs, error messages or whatever. We don't even know your exact product version.
    Mylenium

  • IOS6 Headset / Headphone "Skip to the next chapter" & "Return to the previous chapter" functions don't work in the Music App

    "Skip to the next chapter" & "Return to the previous chapter" functions don't work in the iOS 6 Music App when listening to Podcasts and Audiobooks through Headsets (Apple & 3rd party), Speaker Docks, and in my autos handsfree bluetooth system (Ford Sync).
    Listening with the Podcasts App allows "Skip" and "Return" to work. So, this is either a bug or Apple is forcing the use of the Podcast App to get the "Skip" & "Return" controls. All the other headset functions work as designed.
    I listen to news Podcasts in chronological order. In iTunes I set up smart playlists sorted by release date for the podcasts. The Podcast App doesn't support playlists therefore I need to use the Music App.
    Is anyone able to get "Skip" and "Return" to work in the Music app?
    Thanks for any insight!

    We are fellow users here on these forums, you're not talking to iTunes Support nor Apple. If you want to leave feedback for Apple then you can do so here : http://www.apple.com/feedback/ipad.html

  • After upgrading to iOs 5.1 the AV composite cable don't work, appear a message: the device is not compatible with iPad2, anyone else had this problem or have a solution for it?

    After upgrading to iOs 5.1 the AV composite cable don't work, appear a message: the device is not compatible with iPad2, anyone else had this problem or have a solution for it?

    Try a reset. Press & hold the Power and Home buttons together for 10+ seconds, ignoring the red power-off slider, until you see the Apple logo. It is safe to do, there should be no content loss. It is the same as rebooting your computer.
    If that does not work, restore the iPad to the factory settings.

  • I just bought a new iPhone 5 and both the itunes and the App Store apps don't work, can anyone give me some answers?

    I just bought a new iPhone 5 and both the itunes and the App Store apps don't work, can anyone give me some answers?

    Follow the directions here:
    http://support.apple.com/kb/HT2109

  • Why the alternate audio in netflix not working?

    why the alternate audio in netflix not working? Apple Mexico

    Maybe because your TV can't decode it?
    Do you know if it's another language track in stereo or Dolby Digital 5.1?
    AC

  • Urgent, please help. why the ListSelectionListener() called twice?

    I had two JList, and every time, I click value in list1, it will call the ListSelectionListener() twice, and when I click on value in List2, it called the list2 actionListener twice also, I don't know why?
    Please help.
    The part of the code list below:
    jList1 = new JList(words1);
    JScrollPane scrollPane1 = new JScrollPane(jList1); jList1.setBackground(Color.lightGray);
    jList1.setBorder(BorderFactory.createLoweredBevelBorder());
    jList1.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
    public void valueChanged(ListSelectionEvent e) {
         jList1_valueChanged(e){
    /* add Column_Name to the jList2*/
    JScrollPane scrollPane2 = new JScrollPane(jList2);
    jList2.setBackground(Color.lightGray);
    jList2.setBorder(BorderFactory.createLoweredBevelBorder());
    jList2.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
    public void valueChanged(ListSelectionEvent e) {
    jList2_valueChanged(e);
    void jList1_valueChanged(ListSelectionEvent evt)
    void jList2_valueChanged(ListSelectionEvent evt)
    {     }

    You can call ListSelectionEvent.getValueIsChanging() to find out if the selection is in progress or if has been finished. You will get an event both when the user starts the selection (presses the button) and when he/she finishes it (lets go of the betton).
    /Michael

  • I mac is snow leopard I bought for 19.99 mountain lion online an my computer has gray screen with the spinning wheel and don't work help me z

    My computer I Mac is 10.6.5 I think but the issue was when I update it ask me for version 10.8.5 that was mountain lion wich I bought it for 19.99 Iand know is not working it had a gray screen with spinning wheel  I have snow  leopard on my iMac I bought mountin lion know the screen I grey I can't do nothing I reboots don't work I inserted the cd for my I Mac don't work can't do nothing I can't remove the cd can someone help me .

    To get the CD to eject, hold down the mouse, or if you use it, trackpad, button while you reboot ... keep holding the button down until it ejects. If that doesn't work, this Apple note has some other steps.
    See this Apple note on steps to take to deal with the grey screen.
    Your iMac needs to be mid-2007 or newer with 2GB minimum memory (4GB+ is recommended) and 8GB or more of available disk space. You also should be at OS X 10.6.8 Snow Leopard to access the App store and install OS X 10.8 Mountain Lion.

  • Play, rewind and forward don't work in the control center in ios7

    My play, rewind and forward buttons are not working in the control center at all but working fine everywhere else

    try restarting or resetting your iphone /
    http://support.apple.com/kb/HT1430

  • J9.03,InputSelectLOV :why the lov Jsp can't return the selected value?

    I puted a InputSelectLOV in my dataeditcompenents.jsp to display the lov Jsp,but when i selected a row,it didn't display the value i selected in my edit Jsp,how can i do?
    and can i return more values from lov to put in my editform?
    the following is my dataeditcompentents.jsp

    the following is my dataeditcompenents.jsp:
    <%@ page language="java" import = "oracle.jbo.html.*" %>
    <%@ taglib uri="/webapp/DataTags.tld" prefix="jbo" %>
    <%-- This JSP component build an edit form for a single record and
    generates an update submit event.
    It is called by the DataEdit tag --%>
    <%
    // Retrieve all request parameters using our routine to handle multipart encoding type
    RequestParameters params = HtmlServices.getRequestParameters(pageContext);
    String amId = params.getParameter("amId");
    String dsParam = params.getParameter("datasource");
    String formName = dsParam + "_form";
    String rowAction = "Current";
    String event = "Update";
    %>
    <%-- Restore the data binding to the datasource passed as parameter --%>
    <jbo:DataSourceRef id="dsEdit" reference="<%=dsParam%>" />
    <jbo:DataSource id="lov" appid="<%=amId%>" viewobject="View1" />
    <%-- Select the way to retrieve the row to edit based on the event --%>
    <jbo:OnEvent name="edit" datasource="dsEdit">
    <% rowAction = "Get"; %>
    </jbo:OnEvent>
    <jbo:OnEvent name="create" datasource="dsEdit">
    <% rowAction = "CreateOnly"; event = "Create"; %>
    </jbo:OnEvent>
    <%-- Build a form with an editable field for each of the attributes of the row --%>
    <form name="<%=formName%>" action="<%=params.getParameter("targetURL")%>" enctype="<%=params.getParameter("encType")%>" method="POST">
    <%-- Retrieve the row to edit --%>
    <jbo:Row id="rowEdit" datasource="dsEdit" rowkeyparam="jboRowKey" action="<%=rowAction%>">
    <table border="0">
    <%-- Iterate through all the Attribute of the row --%>
    <jbo:InputSelectLOV datasource="dsEdit" dataitem="RecieveId" displaydatasource="lov" displaydataitem="SysId,UserName" displayvaluedataitem="SysId" formname="<%=formName%>" lovurl="lovcomp.jsp" />
    <jbo:AttributeIterate id="def" datasource="dsEdit">
    <tr>
    <td title="<jbo:ShowHint hintname='TOOLTIP'></jbo:ShowHint>" align="right"><jbo:ShowHint hintname="LABEL"></jbo:ShowHint><%
    // Mark all the mandatory attributes with '*'
    if (def.isMandatory())
    %>*<%
    } %>
    </td>
    <td wrap="soft" title="<jbo:ShowHint hintname='TOOLTIP'></jbo:ShowHint>"><jbo:InputRender datasource="dsEdit" formname="<%=formName%>" />
    </td>
    </tr>
    </jbo:AttributeIterate>
    </table>
    <%-- Generate an "Update" event as part of the Form --%>
    <jbo:FormEvent event='<%=event%>' datasource='dsEdit' addrowkey='true' />
    </jbo:Row>
    <jbo:OnEvent name="create">
    <% rowEdit.remove(); %>
    </jbo:OnEvent>
    <%-- Pass along originURL request parameters using a hidden field--%>
    <input type="hidden" name="originURL" value="<%=params.getParameter("originURL")%>">
    <input type="submit" value="Update">
    <input type="reset" value="Reset">
    </form>
    <jbo:ReleasePageResources />

  • JSP pages don't work

    I'm running Apache Tomcat 5.0 on Windows XP.
    JSP pages will not work. Even more amazing is that, when I modify the example JSP pages, the changes are not shown and they run as if they were unmodified.
    I have Servlets working fine, but whenever I try to pull up a JSP page I get an error "Unable to compile class for JSP". I have scoured the web for hours and have not found anything that works.
    Evironmental variables are as follows:CATALINA_HOME C:\Program Files\Apache Software Foundation\Tomcat 5.0\
    CLASSPATH C:\Program Files\Apache Software Foundation\Tomcat 5.0\common\lib\servlet-api.jar;
    C:\Program Files\Apache Software Foundation\Tomcat 5.0\common\lib\jsp-api.jar;
    JAVA_HOME  C:\j2sdk_nb\j2sdk1.4.2
    PATH %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\j2sdk_nb\j2sdk1.4.2\bin\;[/CODE]
    I have copied "tools.jar" from the java install dir into ...\Tomcat 5.0\common\lib\tools.jar as suggested.  I have also made all suggested changes to the web.xml and server.xml files.
    15 Duke Dollars to the person who solves this for me.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    I'm running Apache Tomcat 5.0 on Windows XP.
    JSP pages will not work. Even more amazing is
    that, when I modify the example JSP pages, the changes
    are not shown and they run as if they were
    unmodified.Wrong, wrong, wrong. JSPs run on Tomcat 5.0.
    Is this your first time using Tomcat? Are you sure that it's not you, your installation, your deployment?
    Have you ever used JSPs successfully anywhere else?
    Why do you doubt Tomcat before yourself?
    >
    I have Servlets working fine, but whenever I try to
    pull up a JSP page I get an error "Unable to compile
    class for JSP". I have scoured the web for hours and
    have not found anything that works.
    That tells me that your JSP is wrong. It can't be compiled because the code you gave in your JSP is not right. The generated Java code is in work/standalone/localhost. Can you compile this yourself with javac.exe? If not, maybe the compilation errors will give you a clue.
    Evironmental variables are as
    follows:CATALINA_HOME C:\Program Files\Apache
    Software Foundation\Tomcat 5.0\I think it's a really bad idea to install anything in a directory whose name contains a space, like "Program Files". I'd move Tomcat out of there.
    CLASSPATH C:\Program Files\Apache Software
    Foundation\Tomcat 5.0\common\lib\servlet-api.jar;
    C:\Program Files\Apache Software Foundation\Tomcat
    5.0\common\lib\jsp-api.jar;Tomcat ignores the system CLASSPATH, so this is useless. You should learn what Tomcat says the CLASSPATH is and how the class loader works.
    >
    JAVA_HOME C:\j2sdk_nb\j2sdk1.4.2
    This looks right.
    PATH
    %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System3
    \Wbem;C:\j2sdk_nb\j2sdk1.4.2\bin\;
    PATH looks good.
    >
    I have copied "tools.jar" from the java install dir
    into ...\Tomcat 5.0\common\lib\tools.jar as suggested.
    I have also made all suggested changes to the web.xml
    and server.xml files.Suggested by whom? I run Tomcat 5.0, and I don't have the tools.jar in the common/lib directory. Who told you to do that?
    You have a web.xml for every Web app you create, but I usually don't touch the server.xml. What did you change?
    >
    15 Duke Dollars to the person who solves this for me.We'll see. I think they only allow you to award a max of 10 for a question. You wouldn't be the first person to wave Dukes and then skip town without awarding them. - MOD

Maybe you are looking for