Java and native browser communication

Hello all,
I am working on a project that parses an HTML document and retrieves specified data. This module of the app is complete. The app can easily read a URL specified by the user, but the contents of some URLs will of course be different when viewed through a browser due to cookies etc.
Thus, I am trying to access the same HTML doc that a native browser is displaying (ie the same data that is shown upon "view source"). Does anyone know of a way to do this? Thanks in advance!
derek

DrClap wrote:
derekn wrote:
Thanks Chuck!
I presently have a similar implementation which reads the HTML at a URL just fine. However, I essentially want to synchronize my app with the actual HTML that is displayed in a native browser. The reasoning behind this is that the browser will of course do redirects, automatic logins etc. at certain URLs due to cookies and such. It is impractical to attempt to mimick these actions in my app and hope to get the same HTML that the native browser is displaying, so instead I am trying to access the same data. Any thoughts?Okay. So you know what has to be done. If your question is then how to hack into the browser instead, and get it to disgorge its data, good luck to you. It isn't really impractical to handle cookies and redirects and basic authentication logins, though.After researching, I think the best thing to do will be to just embed a fully functional browser in my app using JDIC or a similar technology. Microsoft and Mozilla provide embeddable versions of their browsers. Because you're right, I would essentially have to hack a browser to access that data.

Similar Messages

  • Java and serial port communication

    Hello,
    In my code i have parsed a file through which i have extracted the port name and baud rate .
    Now i want to open the port with this portname and baud rate.
    I have a device moxa card which has 16 port and want to open each and and read and write data into it.
    thanking you.

    RXTX seems to be a decent library for serial/parallel communication using Java.
    [http://www.rxtx.org/]

  • Logging in via Java and using browser session

    Hi,
    Gurus, it is possible to use JAVA to log in to a page asking for credentials and afterwards, use the browser with the session so the logging in part is out of sight for the user??
    Regards

    You can use Session variables. You will have to navigate those session variables across your web pages. Make sure that the session variable's value changes when the user navigates to application B from application A (Using new session object) and vice-versa.
    Hope this helps

  • Java and VB Socket Communication

    Hi All,
    I am developing a prototype which need do get some data from Java to VB application. I created server socket in java, My VB application is sending data to the same port what java is running.
    The Java program able to recognized some data in coming to the port. but BufferedReader, readLine() not able to read the bytes. Please any one help me to resolve this problem.
    Java Code :
    public class KnockKnockServer {
    public static void main(String[] args) throws IOException {
    ServerSocket serverSocket = null;
    try {
    serverSocket = new ServerSocket(4444);
    } catch (IOException e) {
    System.err.println("Could not listen on port: 4444.");
    System.exit(1);
    Socket clientSocket = null;
    try {
    clientSocket = serverSocket.accept();
    } catch (IOException e) {
    System.err.println("Accept failed.");
    System.exit(1);
    PrintWriter out = new PrintWriter(clientSocket.getOutputStream(), true);
    BufferedReader in = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));
    try{
         do{
              String headerLine = in.readLine();
         if(headerLine==null ||headerLine.equals("\r\n") ||headerLine.equals("") ||headerLine.equals("null")){                 System.out.print("");
              continue;
         }else{
              System.out.print(headerLine);
         } while(true);
    }catch(Exception e){
         e.getStackTrace();
    out.close();
    in.close();
    clientSocket.close();
    serverSocket.close();
    My VB code :
    Winsock.Close
    If Winsock.State = sckConnected Then
    MsgBox "Connected with server"
    End If
    'Winsock.Protocol = sckTCPProtocol
    Winsock.RemoteHost = "insgb0333"
    Winsock.RemotePort = 4444
    Winsock.Connect
    If Winsock.State = sckConnected Then
    MsgBox "Connected with server"
    End If
    Winsock.SendData "test"

    thx,
    My java code not ablt to read the data which sent by my VB code.
    String headerLine = in.readLine();
    if(headerLine==null ||headerLine.equals("\r\n") ||headerLine.equals("") ||headerLine.equals("null")){
    The in.readLine() always returning NULL.
    Please help to solve this problem

  • Email links out of Practice Fusion are not active (as they are in IE), which they say is a problem with "something lost in the communication between the Flash engine and the browser". Does anyone have experience with this?

    This is a medical records system, cloud based. I use Firefox to get into the system, but any browser would work. Other than this problem, Firefox works fine (better than IE, in my opinion).
    Patient demographics include their email, which is hyperlinked and should go right to Outlook (my default email program). This works in IE, but nothing happens on the click when using Firefox as the browser.
    I queried Practice Fusion, which replied: In regards to your previous question about the email hyperlink in the patient information, it looks this is not something that can be fixed on our end right now. It is the web browsers' responsibility to handle these types of links, and there seems to be something lost in the communication between the Flash engine and the browser. I apologize for any inconvenience.
    Thanks for any help anyone can provide.

    See if this helps you:
    http://support.mozilla.com/en-US/kb/Changing+the+e-mail+program+used+by+Firefox

  • PDF will not open in my firefox browser although i have updated my jave and adobe, they open in internet explore

    I recently downloaded the latest version of adobe reader, jave and the newest firefox version. I think 3.6.4 (but i could be mistaken). Ever since my firefox updated today 3/8/10 it has stopped opening pdf's in browser. All i see is a blank screen or sometimes just the loading blue bar. It will not open. I do not have this problem when i try an open the same files using internet explorer.

    See if the solutions in this article help to solve your problem: [[Opening PDF files within Firefox]]. For more information on using Adobe within Firefox, see [[Using the Adobe Reader plugin with Firefox]].

  • Data conversion for communication between Java and C/C++ program

    The real problem, i guess, is about data type conversion between Java and C programs. For instance, and int is supposed to be 4 bytes in Java, and also in C/C++. But, as far as I know, the size of and int in C depends on the processors architecture, so if it were a 64 bit arch., size of and int, double, etc. in C, would change. The real scenario would be a communication between a 32 bit machine (Java) and a 64 bit machine (C/C++).
    First of all, is this assumption correct?
    If so,
    how is it possible to deal with this problem in Java?
    Is there any way to know 'type length' automatically? or
    would it be necessary to modify the Java program to work with a C program in 32-bit or 64-bit arch?
    thx in advance

    cotton.m wrote:
    Yes you should develop the C part of the protocol first and then build from there.
    See http://forum.java.sun.com/thread.jspa?threadID=5243547 for a previous discussion of this topic.
    I understand what you mean, also the topic you referenced. I will explain the situation a bit more. The protocol is already defined: (16 bits message size, 16 message id, 32 bit time, etc.); it is also defined in C (structures and so on). So it would be easy to write my Java code using the specified protocol in bytes, and C types wouldn't be necessary to be considered. But, let's say that the C code can't be modified, and I thought (and don't know yet if its correct), that size of C types CAN changed depending on architecture. So if size changes for C types (code is specified in short, int, etc, and not in bit format), it all would be a mess, if I don't implement something in my Java code.
    cotton.m wrote:
    I don't believe that 32 or 64 bit enters the equation here at all.Maybe 32 o 64 doesn't mind, but sparc or PC could take a point here. Communication would be between a sun solaris sparc and windows x86 PC. But if type size in C/C++ does not change, I wouldn't really have any problem then...
    The situation is not ideal, I know, but is what I have; and I think I could have problems if I run the C program in other machines; so I would have to try to solve it whithin my Java Program.
    I hope it is clear now what I need.
    thx
    Edited by: MGasa on Jan 16, 2008 1:51 AM

  • Is it possible to run a website built in Java and applet from Safari browser in iPad

    Is it possible to run a website built in Java and applet from Safari browser in iPad?

    Java isn't supported on the iPad

  • Communication between Abap and Java and Java to Abap

    HI,
    I have installed BI 7.0 and the user complaints that BEx WEB Application Designer Query results are not showing up in the WEB URL Link.
    and the BI user suggests that communication between Abap to java and Java to Abap has to be done?
    How to setup ABAP to JAVA and JAVA to ABAP communication?
    Regards,
    Magham.

    Hi,
    Jco conn from ABAP to Java
    =====================
    You can use the JCO RFC Provider Service of the Web Application Server for your ABAP to Java calls.
    The steps involved in that are
    1. Configure destination in SM59 in SAP.
    2. Create RFC Destination in Visual Admin.
    3. Create a stateless session bean with JNDI name as the name of calling function module in SAP.
    4. Add a business method public void processFunction(JCO.Funtion fn) which is called by the JCO RFC Provider Service. The name should be 'processFunction'.
    5. Set library references in application-j2ee-engine.xml to type weak for the following
    a. com.sap.mw.jco.
    b. com.sap.tc.Logging (if you are using the logging api )
    Here is the sample code for the EJB biz method
    Business Method.
    public void processFunction(JCO.Function function) {
    try {
    // Get the import parameters for the function module
    JCO.ParameterList importList = function.getImportParameterList();
    logger.infoT("The value sent is" +
    (String)importList.getValue("USER_NAME"));
    // Set the export parameter value for the function module
    JCO.ParameterList export = function.getExportParameterList();
    export.setValue("From EJB", "RETURN");
    function.setExportParameterList(export);
    catch (java.lang.Exception e) {
    e.printStackTrace();
    Jco conn from Java to others(ex:ABAP)
    =====================-==========
    • Open Visual Admin(C:\usr\sap\SID\JCxx\j2ee\admin\go.bat) and connect to server
    • Go to Destinations service
    • Open HTTP Settings Tab
    • Add/Edit destination SLD_DataSupplier and type following values
    URL – http://xyz.corp:53000
    Authentication - BASIC
    User – dynproxxx
    Password - bp52st000
    • Press save and test (if you get response code 200 everything is o.k.)
    • Add/Edit other HTTP Destination named SLD_Client with the same values as SLD_DataSupplier:
    URL – http://xyz.corp:53000
    Authentication - BASIC
    User – dynproxxx
    Password - bp52st000
    • Press save and test (if you get response code 200 everything is o.k.)
    • Go to SLD Data Supplier service.
    • Press the button named: Send the Data to SLD and confirm triggering SLD Data transfer (if you receive successful message everything is o.k.).
    ===================
    following blog might helpfull
    =======================
    /people/michal.krawczyk2/blog/2005/03/10/registering-a-new-technical-system-in-sld--abap-based
    for basic infor
    ==============
    http://help.sap.com/saphelp_nw04s/helpdata/en/21/84570b3ae14e77b3047c82218974b9/frameset.htm
    Award points if it helps

  • Start and stop the Communication channel from Java Mapping

    How to start and stop the Communication channel from Java Mapping in XI 3.0
    Scenario  PI - > MQ -> Third Party web application 
    Web application is down and then Communication channels are stop manually .  
    We need to automate this process,
    MQ Solution - Trigger will be set in MQ which will be called when web application is stopped
    Trigger will send u201CSTOP u201C message to PI
    How to configure PI scenario to stop different com channels when this message received ?

    check this link: http://help.sap.com/saphelp_nw04/helpdata/EN/45/0c86aab4d14dece10000000a11466f/frameset.htm
    make sure that MQ send http request to PI. i dont think a configuration scenario is required in PI. Only roles should be enabled with proper user provided to MQ team.
    However, for security reasons, you can configure a scenario if you dont want to expose PI infrastructure directly to 3rd parties.

  • The JNI defines a mapping of Java types and native (C/C++) types.

    As per the tutorial
    The JNI defines a mapping of Java types and native (C/C++) types.Does the above sentence mean that I can use dll written in C/C++ only and not dll written in Pearl.
    Could anyone please give me the solution.

    Please do tell me how can I call a dll file created in Perl ....And I will point out again that I doubt that it is possible to create a dll that has the following characteristics
    1. Is in fact a dll.
    2. Is in fact intended to run anywhere outside of the perl engine.
    Step 2 means that you run perl, not a "perl dll" via C.
    You can do that or at least in the past you could. And that has nothing to do with java nor JNI. So you would learn about it on a perl site.
    And I can only note that when I did that a number of years ago it was very difficult. Certainly much harder than getting JNI to work. And you had better have quite a bit of C/C++ experience before you attempt it.

  • Two issues: Mail dotcom is now telling me to enable java in my browser and firefox has issues w/duckduckgo search engine. I am not allowed 2 instal DDG n search

    2 issues: After a windows update on 5 10 2012, maildotcom says I need to enable java in my browser, when as far as I can tell, it is.
    Second issue is, I am not able to add duckduckgo as my preferred search engine. I get a pop up in search tool add-ons that says "sorry, you need a Mozilla based browser to install a search plug in."
    Why and how can these irritations be fixed?

    '''''<u>NoScript</u>'''''<br />
    *To add a site to the NoScript "whitelist" ('''always allow''') --> when on the site, click the NoScript icon and choose "Allow ''site''"; the site will be placed on the NoScript Options > Whitelist (non-italicized).
    *If you click "Temporarily allow ''site''", the site will be allowed during the Firefox current session (until you close/exit Firefox) and will be placed on the NoScript Options > Whitelist (italicized) and will be removed from the whitelist when you close/exit Firefox.
    *NoScript Whitelist --> click the NoScript icon, choose Options, click the Whitelist tab
    '''''<u>DuckDuckGo</u>''''' (you probably would want 1 & 3 or 2 & 3)<br />
    #This adds a DDG '''toolbar''' and says it adds the "''encrypted (HTTPS / SSL) version of DuckDuckGo in your '''search bar'''"'' --> https://addons.mozilla.org/en-US/firefox/addon/duckduckgo-ssl/
    #You can '''add only an item to the Search Bar''' (without a toolbar) by choosing one of the items here --> http://mycroft.mozdev.org/search-engines.html?name=duckduckgo&opensearch=yes
    #You can '''change the Location Bar search''' (replacing the default Google search) by following these instructions --> http://ilias.ca/blog/2012/03/how-to-make-firefox-use-duckduckgo/
    This DDG page says there is some problem installing DDG plugins but does not explain the problem or who is responsible for fixing the issue
    *http://help.duckduckgo.com/customer/portal/articles/216441-firefox
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''
    Not related to your question, but...
    You may need to update some plug-ins. Check your plug-ins and update as necessary:
    *Plug-in check --> http://www.mozilla.org/en-US/plugincheck/
    *Adobe Shockwave for Director Netscape plug-in: [https://support.mozilla.org/en-US/kb/Using%20the%20Shockwave%20plugin%20with%20Firefox#w_installing-shockwave Installing ('''''or Updating''''') the Shockwave plugin with Firefox]
    *'''''Adobe PDF Plug-In For Firefox and Netscape''''': [https://support.mozilla.org/en-US/kb/Using%20the%20Adobe%20Reader%20plugin%20with%20Firefox#w_installing-and-updating-adobe-reader Installing/Updating Adobe Reader in Firefox]
    *Shockwave Flash (Adobe Flash or Flash): [https://support.mozilla.org/en-US/kb/Managing%20the%20Flash%20plugin#w_updating-flash Updating Flash in Firefox]
    *Next Generation Java Plug-in for Mozilla browsers: [https://support.mozilla.org/en-US/kb/Using%20the%20Java%20plugin%20with%20Firefox#w_installing-or-updating-java Installing or Updating Java in Firefox]

  • Why do iPhones/iPad not support Flash Player/Java and what are my alternatives for browsing sites using these plug-ins?

    Why do iPhones/iPad not support Flash Player/Java and what are my alternatives for browsing sites using these plug-ins?

    There are also iSwifter, Photon, Skyfire, etc., some only support Flash some support Java and Flash.
    Adobe never made a version of Flash for iOS and closed their mobile flash division a couple of years ago. You can get Flash on other personal devices but you will be using a 2 year old version that has not been patched for security vulnerabilities.
    When the original iPhone was released Mr. Jobs said it would never run Java as it was old technology and a security risk. Nothing has changed since.

  • Communication between java and c++, help!

    i am c++ programmer and newly to java.
    now i am developping a client/server app. i use java transfers data (socket) between client and server, and use c++ to create user interfaces because c++ is easier for interfaces.
    my question is:
    in a single PC, java needs to tell c++ what info was read from socket and c++ needs to tell java what info will be written to socket.
    i want to use 2 files (read and write) as media between java and c++. that is: java writes data to a file and c++ reads from the file, and vice versa.
    i know it's not efficient. could you tell me better way to do?
    thanks in advance.

    thanks for reply.
    my problem is: socket is fare in java, not fare in c++
    (win/nt). could u use server in a non nt-server
    machine with c++?I'm not sure what you mean "fair". NT-Server is just a version of NT that Microsoft adds their server products to. Most of which you don't want to use because they are a security nightmare. I think what your asking is can you do the equivalent of Java's ServerSocket in C++. Sure, the socket libraries in Windows (at least last time I checked) were based off the BSD socket libraries. So you would basically do something like:
    // Open socket
    ss=socket(AF_INET, SOCK_STREAM, 0);
    if(ss==-1)
      cerr<<"Error opening socket."<<endl;
      return 0;
    // Fill in address
    struct sockaddr_in server;
    server.sin_family=AF_INET;
    server.sin_port=htons((unsigned short)port);
    server.sin_addr.s_addr=INADDR_ANY;
    // Bind to port
    if(bind(ss, (struct sockaddr *)&server, sizeof(server))==-1)
      cerr<<"Could not bind to port "<<port<<"."<<endl;
      return 0;
    // Ready to accept connections
    if(listen(ss, 5)==-1)
      cerr<<"Could not listen."<<endl;
      return 0;
    // Loop to accept connections
    while(/* some condition */)
      // Accept a connection
      int s=accept(ss, 0, 0);
    }This should work on any version of windows as long as you have winsock. The example code might need to be changed a little though since I copied it from a Linux program I had.

  • I just downloaded adobe and java and now when  I browse i keep getting about trusting the website

    I just downloaded Adobe and Java and now when I use Safari I keep getting a notice that the website is blocked .
    I am not  sure if I installed these applications correctly. Can I un-install them?

    You can't install either of those on an iPad.

Maybe you are looking for

  • "The server responded with an error. The server is currently unreachable or the connection was blocked"

    Hi, since this morning i receive this message on my Mac Air (10.8.5) when i open iCal (which is synced through iCloud): "The server responded with an error. The server is currently unreachable or the connection was blocked". You know what it can be?

  • Seeburger Adpater for PI with EhP

    Hi, Does anyone know whats the correct Seeburger version or the CD set number (for example: 51038606 & 51038611) for PI 7.1 with EhP 1 SPS 05? I'm unable to open the OSS Note 890721, to check the right version or CD set number for Seeburger adapter f

  • Filename is not attached with archivelink process

    Hello Experts, I installed a SAP Content Server with Max DB and I did the different customizing : - creation of  repository - creation of documents type - link of objects etc.. Today I can attach documents (CRM opportunities) without problem BUT I ha

  • Packaging and forwarding at two levels

    In the A/R Invoice, freight can be specified at both row level i.e. INV2 and at invoice level i.e. INV4. I can calculate the fright at the invoice level and display in pld. When I add the table INV2 in the repetitve area, it is getting displayed ever

  • Arch 0.7 ISO -- Grub Install Bug?

    I only encountered two odd issues during the installation of Arch using the 0.7 final ISO. One of them was that when I attempted to install grub to the root partition, the installer only gave me a list of existing partitions up to dev/hda9 as possibl