XML in server getInputstream and redirect to another page

I have written a HttpServlet that accepts XML from the request.getInputStream, does the xml parsing, some DB operations and then the page is supposed to invoke another struts action(.do action) and for that I am using response.sendRedirect("/order.do"). For some reason the redirect is not happening but the rest of the actions are fine.
The request to the HttpServlet is from an external application using webservices.
When I tried to check if the response is already commited, it returns a "false" value. I am confused on how to do the redirect.
Edited by: javalearnerscreen on Sep 19, 2008 2:41 PM

Hi paulcw,
This is my business requirement:
I have a website where every user can shop for vehicle parts and add them to their cart.
Bu to order some special parts, the user needs to be connected to a partner website where he can shop for parts, add to a temporary cart on the partner site and opon checkout, the partner site posts the parts in the temporary cart of the partner site to my website.
To connect to a partner website, I need to call a webservices URL on the partner website by passing some authentication parameters.
The response from the partner site is a webpage which i need to load in an inline frame in my site. To achieve this, I am getting the response stream using the HttpConnection.getInputStream, store it in a html file and then call that html page in the iframe.
The user then shops for parts in the iframe and does a checkout on the iframe. This "checkout" process on the partner site posts the contents as XML to my website to a HttpServlet.
This servlet on my website gets the inputstream from the request, parses the XML, does some DB activities. After this, the iframe should go and the user should be directed to a page within my website.
I am not sure how I can achieve this. Can we use curl in jsp ? If so, how ?
Also, please advise if my approach of page loading is correct .
Thankk you very very much.

Similar Messages

  • How can I eliminate the toolbar that comes up every time I swith websights and says Firefox prevented this page from automatically redirecting to another page and when nothing comes up I have to hit ALLOW and most of the time it screws me up

    I am running OS10 on a MAC and every time I go too another web site (most of the time) a new tool bar pops up that says " Firefox prevented this page from automatically redirecting to another page" and on the other end I must hit the button ALLOW because it is usually screwing me up and Iwant to disable it or use another browser

    Options > Advanced > General, un-check "Warn me when web sites try to redirect or reload the page"
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''

  • I click on link, for example story on ESPN I want to read, and I get redirected to another page, often ad site

    I own a MacBook Air.  On really any site I go to I click on a link and get redirected to another page, often an advertisement.  For example, I am on ESPN and want to click on a story, when I click on the link, a new page or tab opens up.  I have to x out to get to my story.  I use Google and Safari.  In Safari, I click on a story in ESPN and new page opens up as well.  Can any one help?

    There is no need to download anything to solve this problem. You may have installed a variant of the "VSearch" ad-injection malware. Follow Apple Support's instructions to remove it.
    If you have trouble following those instructions, see below.
    Malware is always changing to get around the defenses against it. This procedure works as of now, as far as I know. It may not work in the future. Anyone finding this comment a few days or more after it was posted should look for a more recent discussion, or start a new one.
    The VSearch malware tries to hide itself by varying the names of the files it installs. To remove it, you must first identify the naming pattern.
    Triple-click the line below on this page to select it, then copy the text to the Clipboard by pressing the key combination  command-C:
    /Library/LaunchDaemons
    In the Finder, select
              Go ▹ Go to Folder...
    from the menu bar and paste into the box that opens by pressing command-V. You won't see what you pasted because a line break is included. Press return.
    A folder named "LaunchDaemons" may open. Look inside it for two files with names of the form
              com.something.daemon.plist
    and
               com.something.helper.plist
    Here something is a variable string of characters, which can be different in each case. So far it has always been a string of letters without punctuation, such as "cloud," "dot," "highway," "submarine," or "trusteddownloads." Sometimes it's a meaningless string such as "e8dec5ae7fc75c28" rather than a word. Sometimes the string is "apple," and then you must be especially careful not to delete the wrong files, because many built-in OS X files have similar names.
    If you find these files, leave the LaunchDaemons folder open, and open the following folder in the same way:
    /Library/LaunchAgents
    In this folder, there may be a file named
              com.something.agent.plist
    where the string something is the same as before.
    If you feel confident that you've identified the above files, back up all data, then drag just those three files—nothing else—to the Trash. You may be prompted for your administrator login password. Close the Finder windows and restart the computer.
    Don't delete the "LaunchAgents" or "LaunchDaemons" folder or anything else inside either one.
    The malware is now permanently inactivated, as long as you never reinstall it. You can stop here if you like, or you can remove two remaining components for the sake of completeness.
    Open this folder:
    /Library/Application Support
    If it has a subfolder named just
               something
    where something is the same string you saw before, drag that subfolder to the Trash and close the window.
    Don't delete the "Application Support" folder or anything else inside it.
    Finally, in this folder:
    /System/Library/Frameworks
    there may an item named exactly
                v.framework
    It's actually a folder, though it has a different icon than usual. This item always has the above name; it doesn't vary. Drag it to the Trash and close the window.
    Don't delete the "Frameworks" folder or anything else inside it.
    If you didn't find the files or you're not sure about the identification, post what you found.
    If in doubt, or if you have no backups, change nothing at all.
    The trouble may have started when you downloaded and ran an application called "MPlayerX." That's the name of a legitimate free movie player, but the name is also used fraudulently to distribute VSearch. If there is an item with that name in the Applications folder, delete it, and if you wish, replace it with the genuine article from mplayerx.org.
    This trojan is often found on illegal websites that traffic in pirated content such as movies. If you, or anyone else who uses the computer, visit such sites and follow prompts to install software, you can expect more of the same, and worse, to follow. Never install any software that you downloaded from a bittorrent, or that was downloaded by someone else from an unknown source.
    In the Security & Privacy pane of System Preferences, select the General tab. The radio button marked Anywhere  should not be selected. If it is, click the lock icon to unlock the settings, then select one of the other buttons. After that, don't ignore a warning that you are about to run or install an application from an unknown developer.
    Then, still in System Preferences, open the App Store or Software Update pane and check the box marked
              Install system data files and security updates (OS X 10.10 or later)
    or
              Download updates automatically (OS X 10.9 or earlier)
    if it's not already checked.

  • It is very annoying when I am at a favourite web site and Firefox will not automatically redirect to another page. It is so continuous and I have to "Allow" through the whole time I am at my favourite web sites

    # Question
    It is very annoying when I am at a favourite web site and Firefox will not automatically redirect to another page. It is so continuous and I have to "Allow" through the whole time I am at my favourite web sites.
    Here is one of those sites:
    http://conservatives4palin.com/

    You can make it automatically redirect by doing this:
    1. Go to: Tools > Options > Advanced > General
    2. Untick the 'Warn me when websites try to redirect or reload the page' option
    3. Click 'OK'
    '''If this was the answer you were looking for, please click 'Solved' -- Thanks.'''

  • I am always notified when redirecting to another page and I now want to disable that feature and how can I ALLOW all the time?

    I always get a warning notice that Firefox can "Allow" or "Don't Allow" the redirection to another page. I am now SICK of that feature and want to know how to turn it off, please.

    Try this instead:
    Drive Partition and Format
    1. Open Disk Utility in your Utilities folder.
    2. Select the backup volume from the left side list. Click on the Erase tab in the DU main window.
    3. Set the format type to Mac OS Extended (Journaled.)
    4. Click on the Erase button.
    You will need to reconfigure Time Machine preferences for the backup.
    FYI: Never remove Time Machine backup data except through the Time Machine application. If you aren't sure about using Time Machine then visit Pondini's Time Machine FAQ for help with all things related to Time Machine.

  • How to Redirect to another page Using JavaScript in ADF Faces?

    Hi Guys,
    I have a UI user case that has a af:menu which contains mutiple af:goMenuItem. When user click on the menu, the menu slides down and shows up the af:goMenuItem. As we know, you could define the page destinations in af:goMenuItem to go to another page when user clicked, but af:menu itself cannot be redirected to another page. Well, the user case wants the menu itself could be redirected if user click on it.
    So I am thinking using JavaScript to do this: when the af:menu gets clicked, redirect to another page. BUT, I looked over the ADF Faces Javascript API and was not able to find that piece of code to do this. Any help???
    Another work around for the user case scenario is to use HTML marks + CSS/JavaScript instead of af:menu and af:goMenuItem but this changes the scope of technology although it's not hard to do
    Any other idea to accomplish the user case other than what I could think of ?
    Thanks Guys!
    Jay

    Hi,
    1 - you can have a hidden command item to do the navigation based on a control flow case. In this case, you access the command component from JavaScript create a new ActionEvent and queue it
    2 - JavaScript can use an af:serverListener to call into a server side managed bean method to perform the navigation
    there is no JavaScript API for navigation in ADF Faces because navigation in JavaServer Faces is an event driven framework and we don't support developers fighting the framework.
    Frank

  • Session Time Out and Redirect to login page - urgent

    My problem is I want to display alert message and redirect to the home page when session expires.
    Iam using TimeOutListener in my application as follows.
    public PhaseId getPhaseId() {
    return PhaseId.ANY_PHASE;
    public void beforePhase(PhaseEvent phaseEvent) {
         FacesContext facesContext = phaseEvent.getFacesContext();
    HttpSession sessionx = (HttpSession)facesContext.getExternalContext().getSession(false);
    if(sessionx == null) {
         FacesUtils.sessionCheck = true;
    String ampee = (String)((HttpServletRequest)FacesContext.getCurrentInstance().getExternalContext().getRequest()).getAttribute("ampee");
    if(ampee != null && ampee.equals("ampee")) FacesUtils.sessionCheck = false;
    if(phaseEvent.getPhaseId() == PhaseId.RENDER_RESPONSE) {
         if(FacesUtils.sessionCheck){
         facesContext.getApplication().getNavigationHandler().handleNavigation(facesContext, "", "sessionExpired" );
         FacesUtils.sessionCheck = false;
    ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext();
              HttpServletRequest request = (HttpServletRequest) externalContext.getRequest();
              HttpSession session = request.getSession();
              if (session.isNew()) {
                   try {
                   String errorPageURL = externalContext.getRequestContextPath() +
                   "/index.jsf?errorpage=true";
                   externalContext.redirect(errorPageURL);
                   }catch(Exception e){
                        e.printStackTrace();
    here i have appended param errorPage=true...
    in jsp page i have used following code to get the param<% if(request.getParameter(errorPage)!=null && request.getParameter(errorPage).equals("true")){%>
    <script>alert("session expired");</script>
    <%
    %>
    Can any one help me how to Implement this?
    Do u know another way pls let me know...

    Consider using the Javascript setTimeout() function in conjunction with HttpSession#getMaxInactiveInterval(). The HttpSession#getMaxInactiveInterval() returns the remaining seconds of the session lifetime.
    Basic example:<script>
        setTimeout("alert('The session will timeout after one minute.')", <%= (session.getMaxInactiveInterval() * 1000) - 60000 %>);
    </script>I've given the client one minute (60000ms) extra time space to respond accordingly.
    Use this in combination with the following head:
    <meta http-equiv="refresh" content="<%= session.getMaxInactiveInterval() %>;url=login.jsf">which will redirect to login.jsf if the session is timed out. You can also redirect to another page of your taste, e.g. error.jsf or so.

  • AFter the latest download, my e-mail service keeps getting a bar at the top "Firefox prevented this page from automatically redirecting to another page". I have to keep hitting the "Allow" link? How do I get rid of this?

    Ever since the last update, I'm having problem accessing my e-mail account. I keep getting an annoying bar at the top of the screen "Firebox prevented this page from automatically redirecting to another page." I have to keep hitting the allow button, sometimes twice. And when I do get into the accounts the bar jumps in and out every time I open a new e-mail, or delete and old one.
    How do I get rid of this. I've had this account for years, with a very reputable private e-mail provider. This is nuts.

    See:
    *Firefox/Tools > Options > Advanced > General : Accessibility : [ ] "Warn me when web sites try to redirect or reload the page"
    The setting in "Tools > Options > Advanced > General" is meant as an accessibility feature, as you can see by the label of that section, so that people with disabilities or people who use screen readers do not get confused and is not meant as a safety protection to stop redirecting.
    See also:
    *https://support.mozilla.com/kb/Options+window+-+Advanced+panel#General_tab
    *http://kb.mozillazine.org/accessibility.blockautorefresh
    *http://kb.mozillazine.org/Accessibility_features_of_Firefox

  • I'm getting this message: "Firefox prevented this page from automatically redirecting to another page." but unchecking the box for "warn me when websites try to redirect or reload the page" has not helped. I'm using Firefox 3.6.3 on Mac OS 10.6.3. M'aidez

    Can't load Google Calendar. I'm getting this message: "Firefox prevented this page from automatically redirecting to another page" but unchecking the box for "Warn me when websites try to redirect or reload the page" has not helped. I'm using Firefox 3.6.3 on Mac OS 10.6.3. It's not reported as a generalised problem in Dashboard. Google Calendar opens and works fine on my 12" PowerBook G4, but this is a recent problem on my G5 13" MacBook Pro. Mayday!
    == URL of affected sites ==
    https://www.google.com/accounts/ServiceLogin?service=cl&passive=1209600&continue=http%3A%2F%2Fwww.google.com%2Fcalendar%2Frender%3Ftab%3Dmc%26pli%3D1&followup=http%3A%2F%2Fwww.google.com%2Fcalendar

    No I'm not using NoScript, but I'm pleased to report that the problem got resolved by deleting the original bookmark, logging in again, opening Google calendar, then bookmarking it again.

  • How do I turn off the "firefox prevented this page from automatically redirecting to another page" dialogue ?

    I am a mac user. I tried to access my bank account, but firefox 3.6.8 prevents me by telling me: "firefox prevented this page from automatically redirecting to another page". This is NOT a dialogue which I can click a button. Instead, nothing happens when I type my bank's URL while a small message appears below the URL field bar. I do not have the OPTIONS under the Tools menu (like on Windows version) and my preferences does not give me any option to turn this thing off. Can any one HELP me as I cannot have access to my bank website?

    See: Firefox > Preferences > Advanced > General : Accessibility : [ ] "Warn me when web sites try to redirect or reload the page"
    See: [[Options window - Advanced panel#General_tab]]
    See also: http://kb.mozillazine.org/accessibility.blockautorefresh

  • How do I make Foxfire quit giving me the message Firefox prevented this page from automatically redirecting to another page?

    When I am on some sites Firefox gives me the message Firefox prevented this page from automatically redirecting to another page? and then I have to click Allow. This happens on every single page on certain sites. How can I make this stop all together?

    * [http://kb.mozillazine.org/Menu_differences Firefox > Preferences] > Advanced > General : Accessibility : [ ] "Warn me when web sites try to redirect or reload the page"

  • JSON error when trying to redirect to another page in same application

    I'm trying to set up a PL/SQL dynamic action that is triggered by clicking on a button.  The dynamic action sets two values in a table and then I would like to redirect to another page.  Setting the values works fine.  The code is below:
    declare
    l_information varchar2(255) := :P94_FILENAME;
    BEGIN
    commit;
    UPDATE VDI_METADATA
    SET CREATEUSERLISTNAME = l_information,
        CREATEUSERLISTON = sysdate();
    commit;
    htp.init;
    owa_util.redirect_url('f?p=&APP_ID.:81:&APP_SESSION.::NO:::');
    END;
    The redirect fails with the following eror:
    "Error: parseerror: JSON.parse: unexpected non-whitespace character after JSON data"
    I've tried several approaches, using the suggestions in this forum on how to redirect to a page from within PL/SQL .  None of them result in success.
    Can anyone tell me: What is the system complaining about?  And is there a work-around?
    Thank you.

    John,
    I would recommend adding another true action in your dynamic action that executes javascript.  the logic would just be redirect('f?p=&APP_ID.:81:&APP_SESSION.::NO:::');
    Then remove everything after the commit in your pl/sql action.
    David

  • Tab closes with no error msg when I click on "Allow". Msg: Firefox prevented this page from automatically redirecting to another page. I had to uncheck the Advance/General/Accessibility option for it to work. Why?

    Msg: Firefox prevented this page from automatically redirecting to another page. When I click on "Allow", The 2nd tab closes with no error msg This was Home Depot redirecting to CitiGroup.
    When I unchecked the Advance/General/Accessibility option to be notified of a "redirect" then things worked.
    Why did clicking on "Allow" not work?
    I posted step by step detail in the Trouble Shooting box below.

    Thank you for your answer. It does stop the redirection notices, but now I have no idea if potentially unsafe sites are redirecting me. I cannot figure out why it has only recently started to happen on my home page though, when nothing has changed on there and I've had it set to show redirections, ever since I set up Firefox.
    I guess I'll just have to make the decision as to whether I want to risk redirections or put up with the semi permanent notice.
    Thanks again mha007

  • I get a message Fire Fox prevented this page from automatically redirecting to another page, everytime I log into a bank or credit card web site?

    When I log into my bank or credit cards websites I get a message that says "Fire Fox prevented this page from automatically redirecting to another page." It says "Allow" or an X. Sometimes I can click Allow and it goes but then other times if I click Allow on it kicks me out. If I click "X" it goes but I have to click X every page. How can i stop this?
    Mary

    See: Tools > Options > Advanced > General : Accessibility : [ ] "Warn me when web sites try to redirect or reload the page"
    See: [[Options window - Advanced panel#General_tab]]
    See also: http://kb.mozillazine.org/accessibility.blockautorefresh

  • How can I stop firefox from preventing pages to automatically redirect to another page

    When I go to a bookmarked web site, I get the message (firefox prevented this page from automatically redirecting to another page)
    I can click on (allow) and it will go to page I want but it is irritating to
    have to keep doing this. How can I resolve this

    The preferences option is global. I want to be able to turn this on/off for each page.

Maybe you are looking for

  • Dynamic field in Select Statement

    I am able to create a dynamic statement to insert into the where clause of my sql, but I am unable to dynamically create a select statement. Oracle Reports produces the following error: REP-0499: Column " selected by the query is incompatible with re

  • Report ME80FN - Add additional fields

    Hi, I want to add Tracking No field in  Tcode .ME80FN Also Want to know the release date of PO from report ME80FN. Please guide. Thanks in Advance Regards Amar

  • Dep number range issue (External Assignement)

    Dear All, i am getting error wile posting Dep (AFAB) for external number range assignment for Document type AF (Dep Posting in Current Year, but in last year it get posted with internal number range only) See the error. Create document number range 0

  • Problems with loading AS2 assets into AS3 container

    Hello, in a Project I use the AS3 Loader Class to load AS2-swf-files. The swf-files are placed into different subfolders, since they're using the same filenames and subfoldernames for config-files etc. The Problem is: Whatever swf-file I load first,

  • [SOLVED] Kernel 4.0 with Radeon HD problem: Purple Line

    Hi All, This is my first post on the Arch forums! and probably going to get flamed a bit too as this is not an Arch specific problem. I am just hoping you guys will be able to help point me in to the right direction. The reason I am posting here on t