Redirect after using cfheader/cfcontent

I have a file that a user is prompted to download using
<cfheader
name="content-disposition"
value="attachment; filename=ProPlannerRevenueTemplate.xls"
/>
<cfcontent
type="image/jpeg"
file="#ExpandPath(
'./download_templates/ProPlannerRevenueTemplate_#Left(Hash(session.client_id),
15)#.xls' )#"
deletefile="yes" />
Afterwards, I want to redirect the user to another page, but
the <cflocation> tag I have after this doesn't seem to
execute. Any ideas on how to restructure this so that it will
work?

I do not think you can do these two operations with the same
request. A
<cflocation...> works by sending a client a HTTP status
of 302 FOUND
(Moved Temporarily). If the client acted on this status it
would move
to the specified URL and not download the file. OR it does
not act on
this status and receives this response.
What you are attempting to do, is probably best done with
some client
side code. That uses JavaScript to relocate the client once
this
response is received.
Why this is not currently relocating and sending the file is
probably
because of the default reset="yes" parameter of the
<cfcontent...> tag
that discards any response generated before the tag.

Similar Messages

  • How to do a redirect after a jsp:include

    Friends,
    How do I do a redirect either through HttpServletResponse.sendRedirect () or
    <jsp:forward /> in a JSP that does a <jsp:include /> at the top.
    I am getting a IllegalState exception.
    Thanks
    Regards
    Lawrence Lourduraj
    VocaLoca Inc.

    In the doc, it states:
    sendRedirect
    If the response has already been committed, this method throws an
    IllegalStateException. After using this method, the response should be
    considered to be committed and should not be written to.
    In other words, you must not do anything before or after with the response.
    Cameron Purdy, LiveWater
    "Lawrence Lourduraj" <[email protected]> wrote in message
    news:8ip9p4$r0g$[email protected]..
    >
    Friends,
    How do I do a redirect either through HttpServletResponse.sendRedirect ()or
    <jsp:forward /> in a JSP that does a <jsp:include /> at the top.
    I am getting a IllegalState exception.
    Thanks
    Regards
    Lawrence Lourduraj
    VocaLoca Inc.

  • Redirect After Logout

    Hi,
    I have created several example public pages each containing the Portal 9.0.2 out-of-the-box Login portlet.
    Depending on which page I use to login from, when I logout, I would like to automatically return to the same login page.
    In Portal Rel 1, this was simply a case of setting the p_done_url value to that of the required login page.
    However, in Rel 2, logout first takes you to the default logout page (the one confirming logout from various partner applications), where you are then required to manually click RETURN, at which point, the correct login page is displayed.
    I have read various threads both from this forum and metalink, and each suggests looking in the SSO Admin Guide. However, this explains how to replace the Logout page, not how to redirect after logout. If I use the method described in the SSO Admin Guide, I can only have one logout page. This would mean that I would not be able to replicate the Rel 1 functionality, where I could go to a different login page each time after logout.
    Does anyone out there know how to replicate this Rel 1 functionality?
    Thanks in advance for all help received.
    Regards,
    Gillian

    Hi Anupam,
    This is a copy of the single sign-off file, ssoff.jsp:
    <html>
    <body bgcolor="white">
    <%@ page buffer="5" autoFlush="true" %>
    <%
    response.setHeader("Cache-Control", "no-cache");
    response.setHeader("Pragma", "no-cache");
    response.setHeader("Expires", "Thu, 29 Oct 1970 17:04:19 GMT");
    String done_url = null;
    int i = 0;
    try
    done_url = request.getParameterValues("p_done_url")[0];
    out.println("<center><h1>Single Sign-Off</h1><p>");
    out.println("<table border=0>");
    out.println("<tr>");
    out.println("<th>Appliction Name</th>");
    out.println("<th>Logout Status</th>");
    out.println("</tr>");
    for(;;)
    i++;
    String app_name = request.getParameterValues("p_app_name"+i)[0];
    String url_name = request.getParameterValues("p_app_logout_url"+i)[0];
    out.println("<tr>");
    out.println("<td>"+app_name+"</td>");
    out.println("<td><img src='" url_name "'></td>");
    out.println("</tr>");
    catch(Exception e)
    if(i>1)
    out.println("</table>");
    out.println("<br>");
    response.sendRedirect(done_url);
    else
    out.println("<h2><center><font color='red'>ERROR:</font>");
    out.println("This page can not be accessed directly!</center></h2>");
    %>
    </body>
    </html>
    When I now logout from the portal, this page is called as expected, but the logout process is not executed nor does the redirection take place. Any pointers??
    Thanks,
    Gillian

  • Redirected printers using Remote Desktop Easy Print driver work only once during session

    Hello all
    We are running Windows Server 2012 R2 Remote Desktop Services Sessions hosts with printer redirection allowed using only the Easy Print Driver, we have no other drivers installed on the servers. All client printers are redirected and can print fine, but
    only once per session! We have tested with several different client printers and they all work a single time in each session. After that the user needs to log off and then back on again to be able to print once again, but only once. Needless to say, our users
    are annoyed. If I look at the c:\windows\system32\spool\printers folder while jobs are printing, but failing, I can see the spool files appearing and disappearing as jobs are spooled. No errors in the event logs accompany the behaviour. Our clients are running
    Windows 7, 8 and 8.1. All exhibit the same problem. The error looks a little like what is described here:
    http://support.microsoft.com/kb/2925429
    While similar, this problem describes a scenario where Easy Print is not used, but XPS is, and since Easy Print is based on XPS and the behaviour is very similar, I am tempted to make a connection.
    I have checked all the usual stuff with permissions etc, and no manufacturer provided drivers are present. The problem appears on newly installed systems as well as one that have been running for some time. Restarting the spooler services does not resolve
    the problem. Actually I do not think it is related to the spooler service or driver framework at all, but rather is an Easy Print driver issue that is occurring much later in the process, if not I would see some errors in the logs and no jobs would print at
    all.
    Anyone ever heard of something like this?
    Thanks
    Morgan

    Hi Morgan,
    Based from your description, users can only print once during single RDP session, I suggest you check if this issue also happens locally.
    In addition, after the first print attempt, does any other issue exist on the RDP session?
    Is the server fully patched? If there are any available driver updates, please also apply them. If there are any third party software installed, try disable/uninstall them to see if the issue persists.
    You can also enable print auditing to get more detailed information about this issue.
    More information for you:
    Auditing Printing Events
    https://technet.microsoft.com/en-us/library/cc976774.aspx
    Logging Spooler Events
    https://technet.microsoft.com/en-us/library/cc976746.aspx
    Best Regards,
    Amy
    Please remember to mark the replies as answers if they help and un-mark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]

  • How to redirect after task approved?

    Hi All,
    I tried to redirect after task approved/reject like:
    %Current Task:Form_URN%]&Source=http://sharepoint/sitename
    This technique is working in dev site but not in production. Its redirects to task list only. Is there any other work around for this issue?
    Thanks in advance!

    Hi,
    According to your post, my understanding is that you wanted to redirect after task approved.
    In order to solve the problem more efficiently, can you descript more detail that how you create the workflow and where you add the action you mentioned?
    In addition, please refer to the official article related, hope you could find something useful from it:
    http://msdn.microsoft.com/en-us/library/ms772417.aspx
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • [JSF2] Redirect after post, flash scope, keepMessages

    Hi,
    I'm using the redirect-after-post (or post-redirect-get) pattern [1] in a JSF2 application. To preserve the faces messages until the next request (get), I call FacesContext.getCurrentInstance().getExternalContext().getFlash().setKeepMessages(true) before returning the redirect as a result from my action method.
    All works fine, however, if I keep redirect-after-posting through my application, these messages never disappear. I have to manually clear them before issuing another redirect as in:
        private static void removeRenderedMessages(FacesContext ctx) {
            final Iterator<FacesMessage> msgIterator = ctx.getMessages();
            while (msgIterator.hasNext()) {
                if (msgIterator.next().isRendered()) {
                    msgIterator.remove();
        }Is this a bug or a feature (I'm using Mojarra 2.0.2 in Glassfish 3 web profile)? I was under the impression that variables in flash scope survive for exactly one request.
    Cheers,
    Daniel
    [www.flexive.org|http://www.flexive.org]
    [1] [http://en.wikipedia.org/wiki/Post/Redirect/Get|http://en.wikipedia.org/wiki/Post/Redirect/Get]

    Hi,
    I'm using the redirect-after-post (or post-redirect-get) pattern [1] in a JSF2 application. To preserve the faces messages until the next request (get), I call FacesContext.getCurrentInstance().getExternalContext().getFlash().setKeepMessages(true) before returning the redirect as a result from my action method.
    All works fine, however, if I keep redirect-after-posting through my application, these messages never disappear. I have to manually clear them before issuing another redirect as in:
        private static void removeRenderedMessages(FacesContext ctx) {
            final Iterator<FacesMessage> msgIterator = ctx.getMessages();
            while (msgIterator.hasNext()) {
                if (msgIterator.next().isRendered()) {
                    msgIterator.remove();
        }Is this a bug or a feature (I'm using Mojarra 2.0.2 in Glassfish 3 web profile)? I was under the impression that variables in flash scope survive for exactly one request.
    Cheers,
    Daniel
    [www.flexive.org|http://www.flexive.org]
    [1] [http://en.wikipedia.org/wiki/Post/Redirect/Get|http://en.wikipedia.org/wiki/Post/Redirect/Get]

  • NEW FEATURE: Redirect after Submit

    We just released the Redirect after Submit feature on Friday (6/24/11). This has been a very commonly asked for feature. The problem is this - how do I get the respondent back to my website once they successfully filled out the form. Currently the respondent ends on the confirmation page and has to manually navigate back to your website - which is far from optimal.
    This feature is part of the Basic and Plus plans; and it can be found on the "Options" tab under the "Redirect URL" section. This option will work on previously created forms as well as new forms.
    Here is what the UI looks like:
    You have two redirect options:
    Redirect back to the first page of the form - Why would you ever want to do that?? If respondents are filling the form out in person (like an event registration) at a kiosk-like computer or tablet then this feature allows you to automatically redirect back to the beginning of the form (and it will be empty) so the next person in line can fill it out.
    Redirect to a specific URL - Type in the URL to the website you want to redirect and set the amount of time the user sees the confirmation page (the minimum time is 5 seconds).
    Now when the user Submits the data the confirmation page will look something like this:
    After 5 seconds it will automatically redirect back to your website or to the beginning of the form depending on the option you chose.
    Enjoy!
    Randy Swineford
    FormsCentral product manager
    (Randy Swineford, 12/20/2011) Updated description to include new option

    The difference is web forms are used in browsers and PDF forms are often not. Web servers have always been able to return a redirect response that causes the browser to load the specified URL. Most PDF viewers don't know what to do with such a response, but Adobe Reader/Acrobat do know what to do with an FDF response, which is what FormsCentral returns and results in the popup message that you see. PDF forms can be loaded in a browser or directly in Reader/Acrobat or non-Adobe PDF viewer, but in both cases the viewer doesn't know what to do with an HTML redirect response from a web server. This is outside of the control of FormsCentral so it would require a change in the way Reader/Acrobat behaves.
    There is a technique that can be used in PDF viewers that support the app.launchURL JavaScript method (http://livedocs.adobe.com/acrobat_sdk/11/Acrobat11_HTMLHelp/JS_API_AcroJS.89.155.html) and loading form data or triggering JavaScript returned in an FDF, but this method isn't currently supported in the mobile versions of Adobe Reader, so it would only be a partial solution even if FormsCentral were to return the appropriate FDF response.

  • User console redirection webpage uses unnecessary browser sniffing

    User console redirection webpage uses unnecessary browser sniffing
    https://ps.palmws.com/palmcsext/console/
    That user console redirection webpage has this piece of JavaScript that uses unnecessary browser sniffing:
    <script type="text/javascript" language="javascript">
    function checkBrowser()
    var agt=navigator.userAgent.toLowerCase();
    var is_mac = (agt.indexOf("mac")!=-1);
    var is_ie = (agt.indexOf("msie")!= -1);
    var is_opera = (agt.indexOf("opera")!= -1);
    var is_firefox = (agt.indexOf("firefox")!= -1);
    var is_window = (agt.indexOf("window")!= -1);
    var is_safari = (agt.indexOf("safari")!= -1);
    if (is_window) {
    if (is_firefox || is_ie || is_safari) {
    window.location = "/palmcsext/console/pages/LoginPage.iface";
    } else {
    window.location = "/palmcsext/console/notfound/notfound.html";
    } else if (is_mac) {
    window.location = "/palmcsext/console/pages/LoginPage.iface";
    } else {
    window.location = "/palmcsext/console/pages/LoginPage.iface";
    </script>
    The browser sniffing is pretty harmful. Remove it.
    Just simply change the script to:
    window.location = "/palmcsext/console/pages/LoginPage.iface";

    XP1 wrote:
    If you look at the logic, even unsupported browsers will pass the test.
    The if statements only check for supported browsers running on Windows or Mac OSes. If the user is using a different OS, regardless of supported or unsupported browser, the webpage will still redirect correctly.
    The script doesn't do a good job of checking for supported browsers either. The user can set a custom user agent, and the code can't rely on the user agent string.
    Checking for browser support should be done by feature detection, not by user agent string checking.
    If the user sets a custom user agent string or uses a browser with which the code works, then it harms the user.
    The concept of the web is that it should work everywhere. Blocking browsers not only harms the user but also harms the web.
    If the code is written to web standards, the webpage should work in all modern browsers.
    Thus, it is pointless, inefficient, and unnecessary to have those if statements there.
    Like I said, the code can be simplified by just using 1 line:
    window.location = "/palmcsext/console/pages/LoginPage.iface";
    I have asked for more specifics here to find out why that logic is in place.  Not saying I can post back anything, but I have asked.
    And unless I'm reading it wrong, the check for unsupported browsers (so anything NOT firefox, ie or safari) only happens if you're running windows.  If you're on Mac or some other OS, it directs to the working page.  I have asked about that, too.

  • Problem with flash on IE11 after using adobe cleaner

    Problem with flash on IE11 after using adobe cleaner to remove a trial version of photoshop because there was not any entry on add/remove applications in windows 8.1
    Its to frustrating to reinstall everything. I tried everything from your support page with no luck…

    Link for Download & Install & Setup & Activation problems may help
    -Online Chat http://www.adobe.com/support/download-install/supportinfo/

  • My MacBook screen is stuck in "presentation" mode after using my "Mini DisplayPort to VGA Adapter." How can I fix this?

    My MacBook screen is stuck in "presentation" mode (I don't know the correct term) after using my Apple Mini DisplayPort to VGA Adapter - meaning the screen fonts and windows are larger than usual. How can I fix this? I've changed the display settings to modify it a little, but it still doesn't look right. I reinserted the adapter numerous times and restarted my computer, it still hasn't worked. Help!

    Reset PRAM.  http://support.apple.com/kb/PH4405
    Reset SMC.     http://support.apple.com/kb/HT3964
    Choose the appropriate method.
    "Resetting SMC on portables with a battery you should not remove on your own".
    Best.

  • Lose airport connection after using boot camp and windows XP

    After using windows XP on boot camp and shutting down windows and booting to Mac OS 10.5.7 I lose the airport connection and have to restart or reset my airport extreme base station. My imac 2.8 is connected to airport via ethernet. Air port is operating on 5.7 version. This is a recent development and suspect it is related to updates in windows. I do not know where to start but need to solve this problem as it interrupts the other computers on wireless. Thanks Carl

    I have solved problem. It was in the windows settings using airport rather than ethernet connection. Carl

  • Mac is not connecting to TV after using Mini DisplayPort to HDMI Adapter Cable?

    Macbook Pro is not connecting to TV after using Mini DisplayPort to HDMI Adapter Cable. 2010 Macbook Pro, just purchased Mini DisplayPort to HDMI Adapter Cable from Amazon. Link here: http://www.amazon.com/Mini_Dis-HDMI-CB6-Mini-DisplayPort-Adapter-Cable/dp/B003OC 6LWM/ref=sr_1_2?ie=UTF8&qid=1406238976&sr=8-2&keywords=mac+to+tv --When i connect both ends of the cable to the TV and to the laptop, the screen will blink, but then afterwards it will not mirror on the TV. I have tried going to display setting but cannot find the arrangements tab. When i searched "arrangements" a message said, "The Arrangement tab of Displays preferences is hidden because you only have a single display attached to this computer." Not sure how to fix this problem. I have connected this laptop to a TV before, but with a different cable other than the one i just purchased. Any help would be greatly appreciated, thanks.

    Found the fix.  Still don't know if it was Windows, iTunes, or Norton 360, but this worked immediately for me:
    +++++++++++++++++
    edgravel
    Re: iTunes Store Won't Load, Won't Show Error Message
       Aug 13, 2011 4:32 PM    (in response to Daedalme) 
    I found a solution posted from Rodfromnework for PC users. It worked for me and easy to do.
    Start --> Programs --> Accessories (Right Click on Command Prompt) --> Run as Administrator
    then type in:
    Netsh winsock reset
    Hit enter, restart PC, open iTunes, go to Store
    Hope it works for you too. 

  • Aperture 2.0 Activation Key does not work after using older trial version

    I was using the installed trial version of Aperture 1.5+ in my recently purchased MacBook Pro Duo (December 2007). After using the trial version for 30 days I debated whether to take the plunge ...and then within a few days recieved word that v2.0 was out at 199$. That motivated me ...however, here I am nearly one week later without ability to activate a full blown version of 2.0.
    I recieved the activation key, but it doesn't accept it in the dialog to upgrade in the trial version. Hint seems to be that it is not a serial number I am entering but an activation key.
    I did not order a boxed version, so what do I do now? Support is not too helpful as I have searched Apple's website and have no clue as to where to go.
    Last resort ... I want my $199 back!

    did you download the trial for Aperture 2

  • My classic video ipod won't switch back to regular video mode after using it on an elliptical. The port still allows me to charge and works on the elliptical and treadmill but it will no longer change modes to allow me to watch my shows on the ipod screen

    My classic video ipod won't switch back to regular video mode after using it on an elliptical. The port still allows me to charge and works on the elliptical and treadmill but it will no longer change modes to allow me to watch my shows on the ipod screen

    From the iPod's Main Menu choose Videos -> Settings and make sure TV Out is set to Off.
    Otherwise, try a hard reset as well.  To do this, press and hold both the Select (Center) and Menu buttons together long enough for the Apple logo to appear.
    B-rock

  • Several Apps seem to just mysteriously shut down after using for a while. Same with Safari, I will be using Safari and it shuts down. Face book too. I've reset and shut down my iPad 3 and restart it, but it stills shuts down. What to do?

    Several Apps seem to mysteriously shut down after using them for a while. Face Book shuts down , netflix, Safari, and other Apps. They work fine for a short while, or a long while, and then shut down and it brings me to my regular desktop screen. I've tried restarting by completely shutting down the IPad until I see the apple pic and turned it back on, but the shutdowns of apps continue. Anyone else have this issue? It generally started shortly after downloading and installing IOS 7......

    Hi jennyoutwest,
    Welcome to the Support Communities!
    The following articles will provide some troubleshooting steps for your iPhone.
    iPhone, iPad, iPod touch: Turning off and on (restarting) and resetting
    http://support.apple.com/kb/HT1430
    If that does not resolve the issue, refer to page 146 in the iPhone User Guide to Reset All Settings:
    iPhone User Guide for iOS 7
    manuals.info.apple.com/MANUALS/1000/MA1565/en_US/iphone_user_guide.pdf
    The final troubleshooting step would be to restore your device:
    iTunes: Restoring iOS software
    http://support.apple.com/kb/ht1414
    Restoring your device will delete all data and content, including songs, videos, contacts, photos, and calendar information, and will restore all settings to their factory condition. Before restoring:
    Verify that you are using the latest version of iTunes.
    Back up your device.
    Transfer and sync content to your computer.
    Cheers,
    - Judy

Maybe you are looking for

  • Bluetooth headset disconnects wireless Mighty Mouse

    I have a Jabra bluetooth pair of headphones (BT620S) that I use with my Intel iMac. They work great as headphones since they are connecting via A2DP. But they also have the option of being used as a headset, for example with softphones or similar. On

  • Spool Output getting truncated

    Hi,     I am using ALV grid display in a report.When we schedule the report in background and check the spool,The output is getting truncated (For eg Customer number is getting truncated ).I have checked the print parameters of background job,The for

  • IPhoto ' 06 and '08 shared library

    I just bought myself a shiny new iMac :-P, with iLife '08 installed. I also bought a Synology network drive, with the purpose of keeping all our photos, music, etc in one place. My wife uses a MacBook with Tiger and iLife '06. As I understand, iPhoto

  • Safari always crashes on this website (anyone else experiencing this?)

    Hi, I'm not sure if this is the right place to ask this. Try this for me and tell me if you get the same experiences as me: Go here: http://www.street-directory.com.au Don't worry - it's a legitimate Australian site that displays map information. In

  • Is it possible to add a UDF in Manufacturer and where I can add it ?

    Hi, I need to add an UDF in manufacturer, but i can't find the right place in UDF management tool window. Does anyone know this? Thanks! Lan Edited by: ZHANGLAN on Aug 16, 2010 10:37 PM