Problem with flush=true in the jsp:include tag

Hello
I have deployed a JSP based application , based on the apache struts framework. The web server is Sun One Webserver 6 Service Pack4, on a windows 2000 machine
The same application was tried on SunONE application server 7, and it works without any problem. However in this case the following error , on the page
javax:servlet.jspexception:Illegal to flush within a custom tag
Does this mean flush="true" is not allowed within custom tags
Or is there a workaround for this
Any help is appreciated
thanks
- Aniruddha

Hi,
This is a known problem, ��flush before you include�� limitation in JSP 1.1.
As a result, you have to state flush="true" every time you include a jsp using <jsp:include> tag if you are using JSP1.1.
Fortunately, it is fixed in JSP1.2. The flush attribute controls flushing. If true, then, if the page output is buffered and the flush attribute is given a ��true�� value, then the buffer is flushed prior to the inclusion, otherwise the buffer is not flushed. The default value for the flush attribute is ��false��.
Gary Wang
Developer Technical Support
SUN Microsystems
http://www.sun.com/developers/support/

Similar Messages

  • Flush in the jsp:include tag

    should I state flush="true" every time I include a jsp using <jsp:include> tag in a jsp pages? For example I am trying to include a menu bar on the top of every jsp pages. Should I flush the buffer every time? if not, will it affect the performance?
    Thank you
    Cal

    Hi,
    This is a known problem, ��flush before you include�� limitation in JSP 1.1.
    As a result, you have to state flush="true" every time you include a jsp using <jsp:include> tag if you are using JSP1.1.
    Fortunately, it is fixed in JSP1.2. The flush attribute controls flushing. If true, then, if the page output is buffered and the flush attribute is given a ��true�� value, then the buffer is flushed prior to the inclusion, otherwise the buffer is not flushed. The default value for the flush attribute is ��false��.
    Gary Wang
    Developer Technical Support
    SUN Microsystems
    http://www.sun.com/developers/support/

  • Problem with Jdev11G while running the jsp files

    Hi Experts
    I have a porblem with my jdev 11g
    when i create a new application and create a new jsf page (ex PAGE1.jspx) and run it every thing is fine...
    When i create a second page (ex PAGE2.jspx) and run it then it is displaying the PAGE1.jspx only and
    then i need to manually type the page2 url in browser to access the page2.
    If create n number of pages and run any of the page it is navigating to the PAGE1.jspx only
    I was not having this problem when iam working with jdev 10g .
    Is there and setting i need to change to avoid this or is it the feature of 11g
    Thanks
    Gayaz

    Hi
    there is nothing selected in default property of project properties of veiw controller
    run/Debug/profile section..
    only one check box is checked .i.e (Attempt to run archive file before default).
    When i uncheck that one iam unable to run my application
    It is displaying a popup wiht a message "chose default target to run".
    One thing i noticed is when i run the pages from faces-config.xml by selecting the
    page icon and right click and run .. iam able to see the exact jsp in browser
    when i run the jsp directly iam getting the problem....
    Thanks
    Gayaz

  • New to Jdev: having problem with Helloworld class and the jsp

    Please, i went through the beginner's tour at oracle site and it has been interesting.
    After putting the class name as Hello, the package name as "mypackage1" as in the example, then the extend field as java.lang.object There is always an error saying that "java.lang.object is not a valid base class for this option". Please what can i do, cos it's delaying my practise.
    secondly, practising the jsp stuff is also interesting, but it's not showing the web preview. i mean after designing the stuff myself, it's giving some compilation error.
    What can I do.
    Thanks

    Hello,
    1- Are you running the "Building Your First Program with JDeveloper 10g" located at
    http://www.oracle.com/technology/obe/obe9051jdev/FirstStep/FirstStep.htm
    If not, is it working for you ?
    2- Which exact version of JDeveloper are you running ? (Help -> About)
    You should be running JDeveloper 10.1.2.x.x
    You can get Oracle JDeveloper 10g (Version 10.1.2.1, build 1913) at
    http://www.oracle.com/technology/software/products/jdev/index.html
    look for the chapter "Oracle JDeveloper 10g Production".
    3- Try re-installing JDeveloper (uncompressing the zip file) into a different
    path (ex: C:\JDeveloper10g) and retry the first steps.
    I've retested the "First Steps" against my Windows XP SP2 and it works just fine.
    Regards,
    Steff

  • How do i pass a url with query string using the jsp:forward tag

    This snippet of code gives a 403 error
    <jsp:forward page="testpage.jsp?test=1" />
    How do i rectify it?

    Well better way to go about for the job is to use
    setAttribute("name","value");method in the first page
    and then in next page use method
    String s=getAttribute("name");to retreive the value.
    Url rewritting or using Query String has some disadvantages ,which are handled by above mentioned approach.
    Ashish

  • Jsp:include tag does not preserve encoding of the text

    hi
    I am using Apache web server and Tomcat 4.1.
    I have a jsp:include tag (in say test1.jsp) and I am trying to include a data1.html file. This html file contains UTF-8 encoded text. When this JSP is executed, the UTF-8 text is displayed as garbage characters.
    I have included following in the JSP
    <%@ page contentType="text/html; charset=UTF-8" %>
    I have included following in the info.html
    <meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
    However if I rename the info.html to data1.jsp and then include, the UTF-8 text gets displayed correctly.
    I suppose, the JSP engine does not interprete the content of the html file correctly according to its encoding.
    Where as if it is a .jsp, then it is int erpreting it appropriately?
    Can anybody throw some lite on this?
    regards
    haresh
    sample files.......
    test1.jsp..........
    <%@ page contentType="text/html; charset=UTF-8" %>
    <%
    response.setContentType("text/html; charset=UTF-8");
    %>
    <HTML>
    <HEAD>
    <meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
    </HEAD>
    <BODY>
    <jsp:include page="data1.html" flush="true"/>
    </BODY>
    </HTML>
    data1.html.....
    <meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
    <br>
    &#2361;&#2366;&#2340;&#2368; &#2328;&#2381;&#2351;&#2366;&#2354; &#2340;&#2375; &#2340;&#2337;&#2368;&#2360; &#2344;&#2381;&#2351;&#2366;.
    <br>

    Your generated HTML will be flawed.
    The output of the included JSP is included in the outputstream of the enclosing one.
    Browsers will normally skip any illegal tags when encountered. This included your complete html headers from the included jsp and may (depending on the browser) include all code after the html close tag from that jsp.
    Stricter browsers may simply refuse to display anything at all.
    Read up on what the include mechanism exactly does and on wellformed HTML.

  • Problem with displaying BLOB images on JSP page using a servlet

    hi. I have a big problem with displaying BLOB images using JSP. I have a servlet that connects to the oracle database, gets a BLOB image , reads it, and then displays it using a BinaryStream. The problem is , this works only when i directly call that servlet, that is http://localhost:8080/ImageServlet. It doesn't work when i try to use that servlet to display my image on my JSP page (my JSP page displays only a broken-image icon ) I tried several coding approaches with my servlet (used both Blob and BLOB objects), and they work just fine as long as i display images explicitly using only the servlet.
    Here's what i use : ORACLE 10g XE , Eclipse 3.1.2, Tomcat 5.5.16 , JDK 1.5
    here is one of my image servlet's working versions (the essential part of it) :
                   BLOB blob=null;
              rset=st.executeQuery("SELECT * FROM IMAGES WHERE ID=1");
              while (rset.next())
                   blob=((OracleResultSet)rset).getBLOB(2);
              response.reset();
              response.setContentType("image/jpeg");
              response.addHeader("Content-Disposition","filename=42.jpeg");
                    ServletOutputStream ostr=response.getOutputStream();
                   InputStream istr=blob.getBinaryStream(1L);
                    int size=blob.getBufferSize();
              int len=-1;
                    byte[] buff = new byte[size];
                         while ((len=istr.read( buff ))!=-1 ) {
                   ostr.write(buff,0,len);
             response.flushBuffer();
             ostr.close(); and my JSP page code :
    <img src="/ImageServlet" border="0"  > If you could just tell me what i'm doing wrong here , or if you could show me your own solutions to that problem , i would be very greatful ,cos i'm realy stuck here , and i'm rather pressed for time too. Hope someone can help.

    I turns out that it wasn't that big of a problem after all. All i had to do was to take the above code and place it into another JSP page instead of into a servlet like i did before. Then i just used that page as a source for my IMG tag in my first JSP. It works perfectly well. Why this doesn't work for servlets i still don't know, but it's not a problem form me anymore . Ofcourse if someone knows the answer , go ahead and write. I would still appriceatte it.
    here's the magic tag : <img src="ImageJSP.jsp" border="0"  > enjoy : )

  • Error -43  when try playback on win7 64bits over the network QT that recide MacPro  osx 10.5 however i can play with VLC player, This happend when the QT is inside a Folder with name longer 8 chars other files has no problem with long names just the QT

    error -43  when try playback on win7 64bits over the network QT that recide MacPro  osx 10.5 however i can play with VLC player, This happend when the QT is inside a Folder with name longer 8 chars other files has no problem with long names just the QT  nfs sharing

    Never mind, I already found the solution myself.
    What I did wrong was:
    - not copying the master image to the nbi folder
    - selecting the netinstall-restore.dmg image as source to copy to my HD.
    The thing is, when you create a netinstall image for 10.5, the image itself is already included in the netinstall image so you don't have to do anything else.
    With the 10.4 image however, you also have to copy the master image to the NetBootSP0 directory.
    In the *.nbi folder contains an netinstall-restore.dmg file. But that is only to boot you to netrestore, it's not the image itself.
    Other alternative is to copy the images to another folder that you share with AFP and adjust the configuration of netrestore like described in this manual:
    http://www.shellharbourd.det.nsw.edu.au/pdf/misc/osxrestoringnet.pdf
    This manual was also how I figured out that I forgot to copy the image to the NetBootSP0 folder.

  • TS1559 I have problem with my iPhone 4s, the problem is i can't turn on wifi, when i go to the setting then to the general and then to the about, i see there is wifi address for my iPhone but still i can't turn it on, please help me

    I have problem with my iPhone 4s, the problem is i can't turn on wifi, though i have wifi address in my iPhone setting when i go to the general then about option, i tryed many options like turning of iPhone in airplan mode, reset options, but still the same, its gray button of wifi, please help me.

    Hello Pllumb,
    It sounds like you are unable to turn on Wi-Fi because the option is grayed out in Settings. Use these steps from the following article named:
    iOS: Wi-Fi settings grayed out or dim
    http://support.apple.com/kb/ts1559
    Restart your iOS device.
    Make sure that airplane mode is off by tapping Settings > Airplane Mode.
    Reset the network settings by tapping Settings > General > Reset > Reset Network Settings.
    This will reset all network settings, including Bluetooth pairing records, Wi-Fi passwords, VPN, and APN settings.
    Make sure that your device is using the latest software. To do so, connect your device to your computer and check for updates in iTunes.
    If you still can't turn Wi-Fi on, please contact Apple for support and service options. If you can turn Wi-Fi on but are experiencing other issues with Wi-Fi, please see these steps.
    Thank you for using Apple Support Communities.
    All the very best,
    Sterling

  • I have problem with my iPhone 4s, the problem is i can't turn on wifi, though i have wifi address in my iPhone setting when i go to the general then about option, i tryed many options like turning of iPhone in airplan mode, reset options, but still the s

    I have problem with my iPhone 4s, the problem is i can't turn on wifi, though i have wifi address in my iPhone setting when i go to the general then about option, i tryed many options like turning of iPhone in airplan mode, reset options, but still the same, its gray button of wifi, please help me.

    Hello Pllumb,
    It sounds like you are unable to turn on Wi-Fi because the option is grayed out in Settings. Use these steps from the following article named:
    iOS: Wi-Fi settings grayed out or dim
    http://support.apple.com/kb/ts1559
    Restart your iOS device.
    Make sure that airplane mode is off by tapping Settings > Airplane Mode.
    Reset the network settings by tapping Settings > General > Reset > Reset Network Settings.
    This will reset all network settings, including Bluetooth pairing records, Wi-Fi passwords, VPN, and APN settings.
    Make sure that your device is using the latest software. To do so, connect your device to your computer and check for updates in iTunes.
    If you still can't turn Wi-Fi on, please contact Apple for support and service options. If you can turn Wi-Fi on but are experiencing other issues with Wi-Fi, please see these steps.
    Thank you for using Apple Support Communities.
    All the very best,
    Sterling

  • The ios8 update is causing innumerable problems with my ipad. The info from my calendar just disappeared, I am typing blind with the keyboard most of the time, and I cannot upload pics or paste to FB. When will this be fixed and what can I do in the

    The ios8 update is causing innumerable problems with my ipad. The info from my calendar just disappeared, I am typing blind with the keyboard most of the time, and I cannot upload pics or paste to FB. When will this be fixed and what can I do in the Meantime?

    Have you tried yesterday's update to iOS8.0.2?
    iOS 8.0.2
    This release contains improvements and bug fixes, including:
      •  Fixes an issue in iOS 8.0.1 that impacted cellular network connectivity and Touch ID on iPhone 6 and iPhone 6 Plus
      •  Fixes a bug so HealthKit apps can now be made available on the App Store
      •  Addresses an issue where 3rd party keyboards could become deselected when a user enters their passcode
      •  Fixes an issue that prevented some apps from accessing photos from the Photo Library
      •  Improves the reliability of the Reachability feature on iPhone 6 and iPhone 6 Plus
      •  Fixes an issue that could cause unexpected cellular data usage when receiving SMS/MMS messages
      •  Better support of Ask To Buy for Family Sharing for In-App Purchases
      •  Fixes an issue where ringtones were sometimes not restored from iCloud backups
      •  Fixes a bug that prevented uploading photos and videos from Safari
    For information on the security content of this update, please visit this website:
      http://support.apple.com/kb/HT1222

  • TS3694 good evening i have an problem with my iphone 4 the wif and network cant on now if i tray is showing iTunes i tray to reload the ios is showing an error -1 can you help me

    good evening i have an problem with my iphone 4 the wif and network cant on now if i tray is showing iTunes i tray to reload the ios is showing an error -1 can you help me

    No problem, glad to help!
    Update: my PC USB hub was connected to a USB 3 port, I connected the 30 pin cable directly to my PC, And the restore worked just fine. Restored phone from iCloud backup and seems to be working fine.

  • TS5376 I'm having a problem with downloading and installing the new version of itunes for windows (11.1.4)  I have done everything the troubleshooting article has said and it is still not working properly.

    'm having a problem with downloading and installing the new version of itunes for windows (11.1.4)  I have done everything the troubleshooting article has said and it is still not working properly.  I have even done a repair to see if that works and it has not.  Has anyone else found a new way to get it working?

    Try Troubleshooting issues with iTunes for Windows updates.
    tt2

  • HT1222 I am trying to update my phone so I can save my info on my old phone & get a new phone, but I get a error that says "There was a problem with downloading teh software, the network connection timed out.."  HELP!  Not sure what my settings shoud be..

    I am trying to update my phone so I can save my info on my old phone & get a new phone, but I get a error that says "There was a problem with downloading teh software, the network connection timed out.."  HELP!  Not sure what my settings shoud be...
    I never updated anything until now...I want o update my iPhone to the newest version, but i do not want ot loose all that I have on this phone. I was told I needed to update the operating systems so i can put things into the cloud for transport to new phone, but I am just not sure how to do this..Can you help out here??

    Dear Jody..jone5
    Good for you that can't update your iphone because I did it and my iphone dosen't work for example I can't download any app like Wecaht or Twitter..
    Goodluck
    Atousa

  • Hello , please am having a problem with my iphone 5 , the battery runs out quickly , also if i turn on 3G it will run faster , 15 minutes and the iphone battery will be out , and my final problem is that is "no service " appears a lot can you help ?

    Hello , please am having a problem with my iphone 5 , the battery runs out quickly ,another problem also if i turn on 3G it will run faster , 15 minutes and the iphone battery will be out . My final problem is that  "no service " appears a lot  especially when opening wifi or 3G , can you help ?

    Your battery is running quickly because your cellular data connection is weak.
    Is your phone carrier a supported carrier:   Wireless carrier support and features for iPhone in the United States and Canada - Apple Support
    For your no service issues:  If you see No Service in the status bar of your iPhone or iPad - Apple Support

Maybe you are looking for

  • MSS IAC reporting error?

    Hi, We created custom MSS role which has limited services from standard MSS role.  So we didn't want to make any change to the standard MSS role.  One of the service under custom MSS role is reporting we made it to point to reporting page(PCD as belo

  • C# & Visual Studio Community

    Searching the forum w/queries for where to post is nauseating. Why doesn't anything for C# of Visual Studio show up? I have no idea where to ask except to post here in 'Where in the forum ...' trying to get pointed in the right direction. Not to go n

  • Doubts on nonxa oracle datasources in Weblogic JTA transaction

    I am doing some studying on XA transaction handling in weblogic 10.3.6. I read a lot materials on web saying that can't enlist more than 1 non xa datasources inside one single XA transaction, so I am doing a simple test: trying to update one record i

  • Not able save the mapping after writing the 4th UDF (in PI 7.1)

    Hi All, After writing the 4th UDF i am not able to save the mapping in PI 7.1, i am getting the following error "the length 3 of the array 'sortedFunctionKeys' is not equal to the number 4 of functions". Please let me know how to overcome this Regard

  • Delivery address of a PO has German display for PO Box

    Hi Experts, Delivery address of a Purchase Order has the German display for PO Box . This happens when the user tries to get the print Purchase Order. In print preview , everyhting is in English except PO Box (showing like postfatch(German word for P