IllegalArgumentException making HTTP request

My MIDlet works beautifully inside the Palm emulator. It makes an HTTP request to my servlet, and correclty handles the binary data it gets back, using HttpConnection.openInputStream().
However, when I run the same MIDlet from my Visor Neo (after first establishing an internet connection), the first "getXxx()" call I make results in an IllegalArgumentException. (I have confirmed that HTTP communications are working between the Visor and my servlet by browsing to my servlet from an HTML browser on the Visor and viewing the HTML sent by my servlet.)
I am still waiting on the Visor ROMs for the emulator from Handspring to see if the problem is with Handspring's version of PalmOS 3.5, but I'm hoping it isn't the Visor.
-k

Hello
Can someone tell me how to make the Palm Emulator network capable? I want to access a servlet through the palm emulator to test whether the network capability works fine.
Thanks
prasso

Similar Messages

  • Re: Servlet making HTTP requests

    Hi,
              We are using an application that uses a servlet to perform some JDBC calls
              (which take about 30 minutes) and then make some HTTP requests (which takes
              about 5 to 10 minutes) to another application.
              Once the client has made the request to initiate this process it waits for
              the complete process (40 minutes) to complete. I know this is not ideal but
              its what we've got to live with.
              After a minute or so after the servlet has started making the HTTP requests
              the browser stops responding and has a blank frame displayed instead of the
              response data. We have assumed that after the servlet makes the HTTP
              requests the other application it is not interacting with the HTTP session
              on the server the client is connected to and a timeout occurrs. This
              termintes the request and is why we see a blank frame. Is this correct ? The
              HTTP requests complete successfully in the background.
              Any advice would be greatly appreciated.
              Kev
              

              Your application is really tough and interesting. Web browser usually has timeout
              limit. Proxy server also has timeout limit (usually 30 seconds). If no communication
              after such kind of timeout limit, your browser will stop.
              When your code calls getWriter() or getOutputStream(), your servlet will flush
              all HTTP response header data to your browser and your browser then will get the
              response from your servlet. Beyond that, if you don't send any data from your
              servlet to your browser before proxy or browser timeout, you can only get a blank
              screen.
              If you want to monitor how your servlet works, try to BUILD INTERCATION. At least,
              send data from your servlet to your browser for each time interval which will
              not be longer than browser/proxy timeout. You can send out any information you
              like, if your browser understand it. NOTE YOU SHOULD EXPLICITLY CALL FLUSH() of
              your OutputStream() or Writer() to flush() your data following each write(). This
              way, you can keep the connection alive.
              On the other hand, you can also try set content-length field of response to some
              predefined number, and set Connection field as Keep-Alive, before you call getWriter()
              or getOutputStream(). Then send some data to your browser, for example, one byte
              at a time, until you have sent the number of bytes as specified.
              "Kev" <[email protected]> wrote:
              >Hi,
              >
              >We are using an application that uses a servlet to perform some JDBC
              >calls
              >(which take about 30 minutes) and then make some HTTP requests (which
              >takes
              >about 5 to 10 minutes) to another application.
              >
              >Once the client has made the request to initiate this process it waits
              >for
              >the complete process (40 minutes) to complete. I know this is not ideal
              >but
              >its what we've got to live with.
              >
              >After a minute or so after the servlet has started making the HTTP requests
              >the browser stops responding and has a blank frame displayed instead
              >of the
              >response data. We have assumed that after the servlet makes the HTTP
              >requests the other application it is not interacting with the HTTP session
              >on the server the client is connected to and a timeout occurrs. This
              >termintes the request and is why we see a blank frame. Is this correct
              >? The
              >HTTP requests complete successfully in the background.
              >
              >Any advice would be greatly appreciated.
              >
              >Kev
              >
              >
              

  • NEED TO INTEGRATE WITH THIRD PARTY (ALPHATRUST) BY MAKING HTTPS REQUEST FRO

    We have a custom OA-framework based project going live almost immediately. I am responsible for the piece that needs to
    integrate with a service provider, Alphatrust, that we use for signatures. My
    code worked fine in my local JDeveloper environment using a java.net.URL object
    to get a URLConnection. It turns out that my local configuration is defaulting
    to use Sun's http client that is included in the JDK/JRE, while the appserver
    has the configuration java.proto .handler.pkgs=HTTPClient which makes it use
    (I think) some version of the open source client at
    http://www.innovation.ch/java/HTTPClient/. With this configuration my outbound
    request sending xml post data fails with a ClassCast exception thrown from
    HTTPClient.HTTPConnection.getSSLSocket(HTTPConnection.java:1933). I have two
    candidate workarounds in mind.
    (1) remove the configuration java.protocol.handler.pkgs=HTTPClient.
    I have tested this option and it does fix the problem. However I am concerned that it may have unintended
    consequences, such as possibly breaking our Verisign integration.
    (2) place an alternate http client library on the classpath, such as Jakarta Commons
    HttpClient, and use it. But (a) I don't know exactly how to place extra jar's
    onto the classpath on the application server and (b) I don't know what the
    support implications vis-a-vis Oracle would be.
    Please advise. Would you recommond option (1), (2), or is there yet another option that I have not
    thought of? Please treat this request as urgent.
    Here is the java code, from my application module, that fails on the application server.
    OutputStreamWriter wr = null;
    BufferedReader rd = null;
    URLConnection conn = null;
    // System.getProperties().remove("java.proto .handler.pkgs");
    // if I uncomment the above line, it works, but I am concerned about
    // the impact on, for example, Verisign integration
    URL url = new URL("https://pronto1.alphatrust.com/prontosvr2/prontoxml.asp");
    conn =
    url.openConnection();
    conn.setDoOutput(true);
    conn.setRequestProperty("Content-Type", "text/xml");
    Object outs = conn.getOutputStream();
    // the last line above throws a ClassCastException

    Not sure if you have seen oracle.apps.fnd.framework.webui.OAUrl and whether it fits your scenario.
    OAUrl class is used for generating, modifying URL objects in OAF.
    --Shiv                                                                                                                                                                                                                                                                                                                                                                   

  • Making HTTP requests with content-disposition

    I need to write a Java app that can access a web server that returns most content as files (ie. using content-disposition).
    Previously I have used something like this to make HTTP GET requests to return files on a web server.
    ��String strUrl = "http://www.yahoo.com/index.html";
    ��URL url = new URL( strUrl );
    ��URLConnection conn = url.openConnection();
    ��InputStream in = url.openConnection.getInputStream();
    ��byte[] buf = new byte[conn.getContentLength()];
    ��in.read( buf, 0, getContentLength() );
    This doesn't seem to work when the HTTP header has "content-disposition". Here is the header returned by the web server.
    ��Server=Microsoft-IIS/4.0
    ��Date=Thu, 04 Jul 2002 13:18:53 GMT
    ��Content-Disposition=filename=file.xyz
    ��Content-Type=text/html
    ��Cache-control=private
    ��Transfer-Encoding=chunked
    ��content-length=30306
    The number of bytes actually read (as returned by in.read()) is less than the number of bytes as indicated in the content-length.
    How can I handle this?
    Mike

    I have managed to discover that an incorrect content-type header is causing the problems that I have been encountering with file downloads from a web server.
    As I mentioned in a previous post the content-length header was not a good indicator of file download success.
    My program downloads pictures from the internet, almost always in .jpeg format. I have found that files are successfully downloaded only when the content-type header contains the words: image/jpeg. In some instances although I am trying to download a picture file the http content-type header is stated as being: text/html.
    In those instances where text/html is given as the content-type file download fails in so far as the files are not acutally viewable on the native system (Windows varieties in my case).
    To determine the error I used the following code:
    URLConnection urlConnect = myURL.openConnection();
    System.out.println("Http Header, Content-Type: "+urlConnect.getContentType());
    System.out.println("Http Header, Content-Length: "+urlConnect.getContentLength());Even though content-length mostly corresponded with the downloaded files length, if the Conten-Type header was wrong then the file was all but useless.
    Regards
    Davo

  • Facing problem while making http request?

    Hi Friends, 
      I have made blackberry application. I am able to download the same using OTA successfully. With the help of this application I am trying to communicate to server using Httpconnection and want to get some response from server. It is working properly when am i trying Blackberry simulator...but whenever I try to Blackberry device(BB Curve 8900) it is not working and device got stuck. After that I have to restart the device. After restarting again application shows "Uncaught Exception" . So I am not able to find out what is exact problem. So if anybody faced this type of problem please suggest me.thanks in advance...
    Regards,
    hkhan_2005

    Just a thought. Create Calculated Key Figure. In the formula editor use a Formula Variable, say ZFV_TEST. Use Processing by > Replacement Path; Use Reference Characteristic > Charg..Date Date. In Replacement Path > Replace Variable With > InfoObject, Replace With > Key. Save your variable ZFV_TEST. Goto Dimensions > Date. Formula: Target Date = DATE(Charg..Date + DATE(270)). This works iff your values are just for a few records with same date data sans aggregation. Would suggest you to use constant selection on the selection; as the values may be aggregated. If it doesn't work, you may try using a Virtual KF for each line items. Last option, you may try customer exits. You may refer this [thread |Re: Date range for a variable from number of days enterd;for your reference.
    Edited by: Arun Bala G on Oct 29, 2010 6:15 AM

  • Plugin login appears after initial weblogic everytime applet makes http request

    When I visit a page I get the initial login to the page via the realm followed
    by a java plugin loging (shown in attached pictures) every time the applet makes
    an http request. This stops the applet working, any idea how I can solve this?
    [pictures.doc]

    Any idea how to do thisn not really sure what you mean. I already inclued the session
    Id in the URL. Code we use to open connection is
    URL url = new URL(serverProtocol + "://" + serverName + ":" + serverPort + "/"
    + servlet + ((sessionId==null)?"":"?sessionid=" + sessionId));
    URLConnection uc = url.openConnection();
    uc.setDoOutput(true);
    uc.setDoInput(true);
    uc.setUseCaches(false);
    uc.setRequestProperty("Content-type", "java-internal/" + object.getClass().getName());
    Robert Patrick <[email protected]> wrote:
    If you are making HTTP requests from within an applet, you will need
    to provide the
    right HTTP headers to correctly identify that each subsequent request
    is from the
    previously logged-in user (e.g., the cookie that contains the WLS session
    ID
    attached to the response from logging in).
    andrea bates wrote:
    When I visit a page I get the initial login to the page via the realmfollowed
    by a java plugin loging (shown in attached pictures) every time theapplet makes
    an http request. This stops the applet working, any idea how I cansolve this?
    Name: pictures.doc
    pictures.doc Type: WINWORD File (application/msword)
    Encoding: base64

  • PL/SQL posting to HTTP request

    Hi
    As part of a web application I am developing, I need to generate an HTTP post from a PL/SQL package. The problem I am having is that the message going out is not properly formatted and is being rejected by the listening application (in this case, WebCT)
    The MIME message should be formatted like this. (this is what I get when I use Perl to generate the call...)
    POST /webct/systemIntegrationApi.dowebct HTTP/1.1
    Host: roach:4041
    Connection: Keep-Alive, TE
    TE: trailers, deflate, gzip, compress
    User-Agent: RPT-HTTPClient/0.3-3E
    Accept-Encoding: deflate, gzip, x-gzip, compress, x-compress
    Content-type: multipart/form-data; boundary=WebCT_Enterprise_API_boundary
    Content-length: 1506
    --WebCT_Enterprise_API_boundary
    Content-Disposition: form-data; name="adapter"
    ims
    --WebCT_Enterprise_API_boundary
    Content-Disposition: form-data; name="ACTION"
    import
    --WebCT_Enterprise_API_boundary
    Content-Disposition: form-data; name="OPTION"
    unrestrict
    --WebCT_Enterprise_API_boundary
    Content-Disposition: form-data; name="SCTMODE"
    OFF
    --WebCT_Enterprise_API_boundary
    Content-Disposition: form-data; name="TIMESTAMP"
    1091141996
    --WebCT_Enterprise_API_boundary
    Content-Disposition: form-data; name="AUTH"
    3D 1F DC E0 F7 15 5A 1F F4 99 CA 70 D4 68 1C 57
    --WebCT_Enterprise_API_boundary
    Content-Disposition: form-data; name="FILENAME"; filename="baseline_import.xml"
    <?xml version="1.0" encoding="iso-8859-1"?>
    <!DOCTYPE ENTERPRISE SYSTEM "IMS-EP01.dtd">
    <ENTERPRISE>
    <PROPERTIES>
    <DATASOURCE>McGill University SCT Banner</DATASOURCE>
    <TYPE>Initial Creation</TYPE>
    <DATETIME>2000-00-00T12:00:00</DATETIME>
    </PROPERTIES>
    <GROUP>
    <SOURCEDID>
    <SOURCE>Banner 2000 SCT Banner</SOURCE>
    <ID>6536.200409</ID>
    </SOURCEDID>
    <DESCRIPTION>
    <SHORT>HIST-666-001</SHORT>
    </DESCRIPTION>
    <RELATIONSHIP myrelationship="3">
    <SOURCEDID>
    <SOURCE>Banner 2000 SCT Banner</SOURCE>
    <ID>6537.200409</ID>
    </SOURCEDID>
    </RELATIONSHIP>
    </GROUP>
    </ENTERPRISE>
    WebCT_Enterprise_API_boundary
    HTTP/1.1 200 OK
    Date: Thu, 29 Jul 2004 21:56:27 GMT
    Server: Apache/2.0.49 (Unix) DAV/2 mod_ssl/2.0.49 OpenSSL/0.9.6m mod_jk/1.2.3-dev
    Keep-Alive: timeout=15, max=100
    Connection: Keep-Alive
    Transfer-Encoding: chunked
    Content-Type: text/html
    35
    Success: Import file (baseline_import.xml) complete.
    0
    My PL/SQL code that tries to build the outgoing call is
    req := utl_http.begin_request('http://atlas.cc.mcgill.ca:8900/webct/systemIntegrationApi.dowebct','POST', 'HTTP/1.1');
    utl_http.write_text(req,'Content-type: multipart/form-data; boundary=WebCT_Enterprise_API_Boundary' || CHR(13)|| CHR(10) ||
                   '' || CHR(13)|| CHR(10) ||
                   '--WebCT_Enterprise_API_Boundary' || CHR(13)|| CHR(10) ||
                   'Content-Disposition: form-data; name="adapter"' || CHR(13)|| CHR(10) ||
                   '' || CHR(13)|| CHR(10) ||
                   'ims' || CHR(13)|| CHR(10) ||
                   '--WebCT_Enterprise_API_Boundary' || CHR(13)|| CHR(10) ||
                   'Content-Disposition: form-data; name="ACTION"' || CHR(13)|| CHR(10) ||
                   '' || CHR(13)|| CHR(10) ||
                   'import' || CHR(13)|| CHR(10) ||
                   '--WebCT_Enterprise_API_Boundary' || CHR(13)|| CHR(10) ||
                   'Content-Disposition: form-data; name="OPTION"' || CHR(13)|| CHR(10) ||
                   '' || CHR(13)|| CHR(10) ||
                   'unrestrict' || CHR(13)|| CHR(10) ||
                   '--WebCT_Enterprise_API_Boundary' || CHR(13)|| CHR(10) ||
                   'Content-Disposition: form-data; name="SCTMODE"' || CHR(13)|| CHR(10) ||
                   '' || CHR(13)|| CHR(10) ||
                   'OFF' || CHR(13)|| CHR(10) ||
                   '--WebCT_Enterprise_API_Boundary' || CHR(13)|| CHR(10) ||
                   'Content-Disposition: form-data; name="TIMESTAMP"' || CHR(13)|| CHR(10) ||
                   '' || CHR(13)|| CHR(10) ||
                   timestamp || CHR(13)|| CHR(10) ||
                   '--WebCT_Enterprise_API_Boundary' || CHR(13)|| CHR(10) ||
                   'Content-Disposition: form-data; name="AUTH"' || CHR(13)|| CHR(10) ||
                   '' || CHR(13)|| CHR(10) ||
                   mac || CHR(13)|| CHR(10) ||
                   '--WebCT_Enterprise_API_Boundary' || CHR(13)|| CHR(10) ||
                   'Content-Disposition: form-data; name="FILENAME"; filename="xlist.xml"' || CHR(13)|| CHR(10) ||
                   '' || CHR(13)|| CHR(10) ||
                   total_xml_string || CHR(13)|| CHR(10) ||
                   '--WebCT_Enterprise_API_Boundary--' || CHR(13)|| CHR(10));
    resp := utl_http.get_response(req);
    utl_http.read_text(resp, val);
    utl_http.end_response(resp);
    When I watch the network traffic generated by this PL/SQL I do not have any carriage returns which makes WebCT to believe that the message does not carry the proper data and returns Fatal Failure(99): Invalid URL arguments...
    Is there somewhere where I can see sample code for placing HTTP requests using the utl_http package? Or if I am doing something obviously wrong (I am new at this whole PL/SQL thing...) please let me know.
    Thank you
    Bogdan

    If UTL_HTTP.SET_TRANSFER_TIMEOUT has no effect, probably your hang is due to the fact that the machine is completely down and inaccessible.
    As the name suggests, SET_TRANSFER_TIMEOUT only controls the timeout when UTL_HTTP succeeds in making a connection to the remote Web server and it times out the request when no more response is received by certain time while the connection is not closed by the remote server either.
    In your case, you probably need a connect-timeout which isn't provided by UTL_HTTP (yet).

  • Persistent HTTP Requests in BSP: Can you Flush the Response without Ending It?

    Hello all,
    I have been looking for a way to implement a persistent HTTP Request in a BSP.  This means the server keeps the request open as long as possible and sends data periodically to the browser without closing the request.  In other development environments, there would be a way to flush the response to the client, separate from closing the connection, thus making this possible.  I have looked and do not see any way to do this.
    Also, if it is not possible with a BSP, is there another way to do this via the Web Application Server?
    Thanks for any help,
    -Chris

    There are various limits: the number of sockets / file descriptors that the operating system lets a program have open, the amount of socket buffer space in the operating system, the number of simultaneous connections that the web server allows. Each of these can be configured.
    One problem is that a web server starts a thread for each hit. If you have 1000 simultaneous active hits you have 1000 threads. That is quite a lot. I've seen server OSes start buckling at around 400-500 threads. Given a suitable OS you may get higher with a bit of configuration, but I'd say the number of threads is rather a big concern. 100,000 threads? That dog don't hunt.
    An alternative would be not to use a regular web server, but to use a NIO select -based server. Then you can have one thread that handles all the connections. I once did that to write a stock ticker applet. But if you want to do fully standards compliant HTTP implementation that's not trivial.
    If you are writing the client applet as well as the server, consider using a simpler protocol than HTTP and writing a NIO server. NIO isn't quite trivial to get really right; look at examples and tutorials; google is your friend. If you can keep each client's connection open do so; establishing and tearing down hundreds or thousands of connections a second, and sending HTTP request and reply headers, is going to eat network and CPU resources.
    If you are really targeting 100,000 clients at 5 seconds between messages, that comes to 20,000 messages per second. That's a lot; plan for a load balanced server cluster.

  • Dimmer control for LED lights with HTTP Requests

    Hello,
    I'm al little bit know with LabVIEW, but I have a problem that I can't get fixed.
    For a project we control the led lights in a house with http requests (we use the http get request): this exists of a http address, the number of the light, the PWM (the brightness of the led) and the current.
    Controlling the lights with the switches is easy and is working fine. Now what we want to do is create a dimmer that can be controlled with the switches in the rooms.
    The following should happen: if the users clicks one time (so lets say for less than a second) than the light should just switch on. If he/she pushes the light switch and keeps pushing it than the light should dim.
    So the value of the PWM (and this is a string value) should change from 0 to (lets say) 100 when pushing it once, and it should decrease form 100 tot 0 (step by step) when the user keeps pushing the button. The thing I'm having difficulties with is making a difference between just clicking once and keeping the button pushed for a few seconds in the labview software.
    Any tips or ideas? Any Help is Welcome!
    Thanks
    CORE CVBA

    CORECVBA wrote:
    The thing I'm having difficulties with is making a difference between just clicking once and keeping the button pushed for a few seconds in the labview software.
    It sounds like everything else is working and your problem is to detect the button action details.
    Are you talking about a real physical switch or is this a switch on the LbVIEW front panel?
    All you need to do is detect a off->on transition, When it occurs, place the current tick count into a shift register, then subtract it from the tick count in subsequent iterations (as long as the button is TRUE). Change your output as a function of the elapsed time until the button is released.
    LabVIEW Champion . Do more with less code and in less time .

  • Http requests and modules

    recently, all the rage for fast websites is about lowering the numbers of http requests. I'm sure you're aware of that.
    I was wondering: each module creates in fact an http request, right?
    I'm using quite a few modules, especially web contents (for footer, header, navigation…) with the idea of making my site very "modular".
    Would that be then a case of wrong tools implementation?

    Liam is right. If you were running, say, Wordpress on a shared server then it might matter when you could actually get at the php code and mess around with headers and static caching and such, but I think you're attempting to overoptimize in this case, just using BC makes that mostly not your problem.
       IRT = in regards to.
    Old versions of IE are notorious for their lack of support for certain css/js features, bugginess (the z-index bug for instance) and needing ugly workarounds and hacks just to get them to support or pretend to support or not die horribly in the presence of modern standards-compliant code.
    IE6 in particular is important because it's very buggy AND prevalent in enterprise environments, where for various reasons, upgrading to a new browser is all but impossible (which means if you're building a site meant to be viewed by businesses, IE6 support is expontentially more important than if, say, you're putting up a blog and don't really care.) Although most modern frameworks like Boostrap and Skeleton, and js syntactic libraries like jQuery, are built with this in mind and abstract the issue away by including those hacks themselves, sooner or later you'll run into some kind of code that works brilliantly in every single browser you try... except the old versions of Internet Explorer (and then you end up looking around Stackoverflow for an hour or two looking for the fix.) 
    Currently various sites and even Microsoft are trying to phase out support for IE6. I personally think if you're using IE6 you should just be willing to deal with broken websites in the same way that if I drive a Ford Model-T onto the highway I should soon expect to  have a broken car. But understandably, sites that might lose money not supporting IE6 have to deal with it.

  • Controling IP addressed used to issue HTTP request

    Hi,
    We are looking for a way to control the IP address we use for outgoing HTTP requests so that we can choose between two IP addresses we will have on a linux server. We have a Linux server running Java/Tomcat which is making HTTP GET requests to Web servers. We want to be able to use one IP address when making requests to one Web server and use a different IP address when making requests to another server. The actual Java method we are using to get the page is connection.getInputStream(), and we get a connection with url.openConnection();
    Is it possible to control which of the server's IP addresses is used for each request, and if so, how? Is there some way we can set up the Linux server or Tomcat to make it work?
    BTW, I believe it is possible to have two IP addresses on a linux server, but I haven't looked into what's involved. Feel free to comment on this if relevant.
    Thanks!

    It is definately possible to have mutliple IP Addresses on a Linux machine.
    As far as setting the local IP Address to bind to when opening a connection, you cannot do this with the Standard HttpURLConnection, HttpsURLConnection, or URLConnection. You can do it, however, using apaches HTTPClient API.

  • Executing an HTTP Request in ABAP Code

    Hi,
    I have to write an ABAP program to check VAT numbers before making any VAT declaration. SAP checks the logic of the number, however it does not check if a VAT number is still valid for that company. The European Commission has a website (http://ec.europa.eu/taxation_customs/vies/) where you can check centrally all VAT numbers used in the EU. According to the Commission's web site it should be possible to have an open interface. A SOAP service is available (Its WSDL file can be obtained also on the website).
    Does anyone has an idea how this can be done (Current SAP version = SAP ECC 6.0) taken into account there is no XI (or IP) aviable or set up or used.
    Thanks,
    Jan

    Hi,
    The examples are calling a browser but that is not what we are looking for. What we are looking for is (via ABAP) to send our http request and receive back the anwser. They (http://ec.europa.eu/taxation_customs/vies/) provide the SOAP message (WSDL : (http://ec.europa.eu/taxation_customs/vies/api/checkVatPort?wsdl). My question is if it is possible witout using XI and yes how? If I understand it correctly is should be possible via ABAP (example program RSWF_TEST_HTTP), but if I create my own program I get the message HTTP-Receive: RC=400  ICM_HTTP_CONNECTION_FAILED. Maybe the ABAP code is correct, but maybe I should change some settings or configure something else.
    Jan

  • Localhost and http request dilemma!

    Right I have 2 web app servers, one running on serverA from machine1 and one running on serverB from machine2.
    OK, what I want to be able to do is from machine1 open a browser to a webpage running on serverB/page1.jsp.
    From page1.jsp I want to make an http request to "localhost/page2.jsp" which is running on ServerA on machine1 and NOT on the same webserver as page1.jsp.
    Now because each machine sees itself as localhost, when I use "localhost/page2.jsp" instead of making a request to "serverA/page2.jsp", it is trying to make a request to ServerB.page2jsp.
    Now I cant just replace "localhost" with "ServerA" due to security restrictions of my web application. So far what I've tried is putting this javascript within page1.jsp:
        <%
                URL url = new URL("http://localhost:6080/page2.jsp");
                HttpURLConnection httpConnection = (HttpURLConnection) url.openConnection();
                httpConnection.setRequestMethod("GET");
                httpConnection.setDoOutput(true);
                httpConnection.connect();
                InputStream in = httpConnection.getInputStream();
                BufferedInputStream buffer = new BufferedInputStream(in);
                for (;;) {
                    int data = buffer.read();
                    // Check for EOF
                    if (data == -1) {
                        break;
                    } else {
                        out.print((char) data);
                    httpConnection.disconnect();
        %>Any thoughts or ideas are gladly appreciated, or if I'm goign about this all wrong let me know!

    BlueSmurf wrote:
    What security is being restricted with this design?You can only connect to the web server by using "localhost" and not using its real host name or ip address.
    So for example I want a web browser running on a windows machine to access page1.jsp from a linux machine running a web server and within page1 I want to make a http request to page2 running on a webserver on the windows machine and for example return the html from page2 into page1.
    So far I've tried the scriplet in the above code which makes a call to localhost, but it makes a call to the wrong localhost, rather than localhost being the machine im running the browser in, localhost is machine that the web page is running on. I've also thought about using iframes, any thoughts on this approach?

  • When trying to EMAIL from BEX Broadcaster get a 400 bad HTTP request

    When we try to run an email from BEX broadcaster, we get the message below.   We looked in the ICM and it says the request is too large, but when when I copy the request and paste it into the browser it works,  any ideals?
    400 Bad HTTP request
    Bad HTTP request
    Error:     -21
    Version:     7000
    Component:     HTTP_FILTER
    Date/Time:     Mon Apr 05 17:54:18 2010
    Module:     http_auth.c
    Line:     494
    Server:     biprd_BIP_11
    Error Tag:     
    Detail:     illegal request

    Hi David,
    Not exactly sure what the issue is here, but would like to give you some pointers that might help anyway. The error message you see in the ICM would be where I would start. You need to remember that the HTTP request is more than just the URL that you paste into the browser, the URL is one part of it, but there are a heap of other things that go into making the full HTTP request (e.g. POST data, header values etc...)
    I would also refer you to this forum post: Re: 400 Bad HTTP request that references SAP Note 864878
    Hope this helps,
    Simon

  • SecurityException after making client request

    Hi,
    I have a web application that makes an HTTPS client request to another server
    using SSL/certificates. I'm using WebLogic classes for the client calls and modelled
    my code off the WebLogic examples. After making the request (successfully), I
    get a SecurityException when instantiating an InitialContext (see stack trace
    below).
    The exception indicates that the user is "null", but if I call Security.getCurrentUser()
    just before and after the exception occurs, it reports my user correctly. If
    I remove the HTTPS call, I no longer get the exception.
    Is there a known problem, or is there something I could be doing wrong to cause
    this?
    Regards,
    Paul
    javax.naming.AuthenticationException. Root exception is java.lang.SecurityException:
    Authentication for user null denied in realm weblogic
    at weblogic.security.acl.Realm.authenticate(Realm.java:212)
    at weblogic.security.acl.Realm.getAuthenticatedName(Realm.java:233)
    at weblogic.security.acl.internal.Security.authenticate(Security.java:125)
    at weblogic.jndi.WLInitialContextFactoryDelegate.pushUser(WLInitialContextFactoryDelegate.java:522)
    at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:366)
    at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:338)
    at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:211)
    at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:149)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:665)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246)
    at javax.naming.InitialContext.init(InitialContext.java:222)
    at javax.naming.InitialContext.<init>(InitialContext.java:178)
    at com.asa.pcss.business.BeanDataUtility.getResources(BeanDataUtility.java:265)

    Hi Paul,
    I've just encountered exactly the same problem. Did you find a solution?
    Regards,
    Fran
    "Paul Canavese" <[email protected]> wrote:
    >
    Hi,
    I have a web application that makes an HTTPS client request to another server
    using SSL/certificates. I'm using WebLogic classes for the client calls
    and modelled
    my code off the WebLogic examples. After making the request (successfully),
    I
    get a SecurityException when instantiating an InitialContext (see stack
    trace
    below).
    The exception indicates that the user is "null", but if I call Security.getCurrentUser()
    just before and after the exception occurs, it reports my user correctly.
    If
    I remove the HTTPS call, I no longer get the exception.
    Is there a known problem, or is there something I could be doing wrong to
    cause
    this?
    Regards,
    Paul
    javax.naming.AuthenticationException. Root exception is java.lang.SecurityException:
    Authentication for user null denied in realm weblogic
    at weblogic.security.acl.Realm.authenticate(Realm.java:212)
    at weblogic.security.acl.Realm.getAuthenticatedName(Realm.java:233)
    at weblogic.security.acl.internal.Security.authenticate(Security.java:125)
    at weblogic.jndi.WLInitialContextFactoryDelegate.pushUser(WLInitialContextFactoryDelegate.java:522)
    at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:366)
    at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:338)
    at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:211)
    at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:149)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:665)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246)
    at javax.naming.InitialContext.init(InitialContext.java:222)
    at javax.naming.InitialContext.<init>(InitialContext.java:178)
    at com.asa.pcss.business.BeanDataUtility.getResources(BeanDataUtility.java:265)

Maybe you are looking for

  • Mac Pro/ Leopard/ Boot Camp/ XP and 2 ATI Radeon XT1900 ????

    I recently went surfaced from a hardware nightmare with my Mac Pro. I need 4 monitors on the XP pro/ boot camp side and was unble to do so using an added ATI XT1900 to my Mac Pro. The drivers would not successfully load. Also the added card buggered

  • How to boot from .iso in mac os x 10.7?

    Hey,  I have a backtrack3 dvd that i use to be able to boot to in snow leapord, however in lion I am unable to. Anyone know a workaround for this?  Also having the ablility to boot from a .iso that is mountable on my desktop and running it (backtrack

  • Intel-Mac question...

    I have not yet used a new Intel based Mac yet. I have seen conflicting reports online about it's ability to run legacy OSX software, but no reports of OS9 Classic software. Does it run Classic, and if so, how well? iMac G5   Mac OS X (10.4.4)   I wan

  • LabVIEW test engineer opening in Penang, Malaysia

    Specific Skills Required: Experience in developing, deploying, and supporting test processes for telecommunications systems. Detailed understanding of networking systems and protocols including TCP/IP, DHCP. SNMP, ATM, and Frame Relay. Experience in

  • Is it possible to lock an invididual folder?

    Despite the advances of Mac OSX it still does not seem possible to completely lock a Folder independently of other folders, or am I completely mistaken? I have in the past done <command i> and tried to fiddle around with Permissions/Read Write etc bu