Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8736701
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:21:37+00:00 2026-06-13T10:21:37+00:00

I am trying to open a browser window from a web server (using javascript)

  • 0

I am trying to open a browser window from a web server (using javascript) with a xml document sent via a xmlhttprequest response. The application uses javascript, so java 1.5 is no use here.
The code of the xmlhttp post is this:

String strSoap = "<?xml version='1.0' encoding='utf-8'?>" +
"<soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'      xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'>" +
"<soap:Body>" +
xml_body
"</soap:Body>" +
"</soap:Envelope>";    

HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("POST");
connection.setRequestProperty("Content-Type", "text/xml; charset=utf-8");
connection.setRequestProperty("SoapAction", some_action);
connection.setRequestProperty("Man", "POST url HTTP/1.1");
connection.setDoInput(true); 
connection.setDoOutput(true); 
connection.setAllowUserInteraction(true);
connection.setFollowRedirects(true);
java.io.DataOutputStream printout = new java.io.DataOutputStream (connection.getOutputStream());
printout.writeBytes(strSoap);
printout.flush();
printout.close();
java.io.BufferedReader in = new java.io.BufferedReader(new java.io.InputStreamReader(connection.getInputStream()));

Anothe posibility it will be to make the xmlhttprequest from the client side, which is the better option?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T10:21:38+00:00Added an answer on June 13, 2026 at 10:21 am

    Make the xmlhttprequest from the client side. When you receive the response, open a new window (window.open()).

    Using client-side JavaScript, you can then fetch the response from the original window and print it out in the new window.

    For example, suppose the JavaScript variable myXml contained the text response to the xmlhttprequest in the original window then the executing document.write(window.opener.myXml) in the new window would write the response there.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to open a window authenticated page in the browser from a
I am trying open a new window using url.Action. And the new Window url
I am trying to open a web page with a Silverlight App from a
I'm trying to make a open source kiosk like system. When the web browser
I'm trying to open a text file in my browser, when doing it from
I am trying to using watir in ruby, I am able open a browser,
I am working on mvc2 and i'm trying to open from javascript in a
I'm trying to download file from FTP using javascript, for which I created the
I´m trying to open a tab using jquery, here is my code: $(#ecContenedorFolders).tabs({ tabTemplate:
I'm trying to open a zip file with jython using FileInputStream and ZipInputStream. But

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.