Client/Server connection question

I am trying to understand some basic connectivity tricks between Client and Server.
I saw my friend doing stuffs like, query google.com with certain keywords, and present the return results on another webpage or program using jsp. I have no idea how he did that, and I wonder if anyone here is familiar with such tricks.
Edited by: ttback on Dec 3, 2007 4:06 PM

To access a specific search thing you can use URL and URLConnection classes like:
String search_query; //input it...
URL url = new URL("http://www.google.com/search?hl=en&q=" + search_query + "&btnG=Google+Search");
URLConnection urlc = url.openConnection();
//read from urlc
//print the result...

Similar Messages

  • Client/Server connection between unix machines

    Hi,
    I have a problem about connectivity.
    When I try connect to a dsn in a server from a machine with client TimesTen software installed.
    Details:
    CLIENT1: TimesTen Release 7.0.5.0.0 (32 bit Solaris/x86) (tt705) 2008-04-04T00:06:33Z
    SERVER1: TimesTen Release 7.0.3.0.0 (32 bit Solaris) (tt703:17000) 2007-09-12T05:45:43Z
    SERVER2: TimesTen Release 7.0.3.1.0 (32 bit Solaris) (tt703:17000) 2007-10-30T22:52:42Z
    SERVER3: TimesTen Release 7.0.3.1.0 (32 bit Solaris) (smpcluster:15000) 2007-10-30T22:52:42Z
    connections CLIENT1 --> SERVER1 ==> OK
    connections CLIENT1 --> SERVER2 ==> KO
    connections CLIENT1 --> SERVER3 ==> KO
    user@CLIENT1 > ttIsqlcs ngincz_prod_s3scp03
    Copyright (c) 1996-2008, Oracle. All rights reserved.
    Type ? or "help" for help, type "exit" to quit ttIsql.
    All commands must end with a semicolon character.
    connect "DSN=ngincz_prod_s3scp03";
    S1000: Protocol mismatch; client protocol: 32, server protocol: 32
    S1010: Function sequence error
    The command failed.
    Done.
    In error log file server we can see these messages:
    11:44:50.42 Err : SRV: 14749: EventID=37| Client version 32 is not supported, the current server version is 31. Contact TimesTen support for instructions on how to download new versions of TimesTen Client/Server
    11:44:50.42 Err : SRV: 14749: EventID=68| Failed to read request from client. Closing connection without reply.
    Any idea about cause/solution ??

    To enable cross release client/server operation you need to add the line
    -insecure-backwards-compat
    to the ttendaemon.options file located in <tt_install_dir>/info on the system that hosts the datastores that you wish to connect to. For this to take effect you must restart the main daemon so you will need to shutdown all the datastores before doing this!
    This is documented in the TimesTen Installation Guide and the Timesten operations Guide.
    Regards,
    Chris

  • Client server applet question

    Hello I have a client and server program on computer a and computer b.
    I want a webpage with a java applet.
    I want that if I push a button in the client the java applet gets a message.
    I want that the server looks for changes in the applet and when there is a change the server does something.
    I have a program where the client and server communicate with eachother but how can I make a program like I want?
    How can I send a message to the applet(on a webpage) from the client and how can I look at the applet with my server??

    Aplet runs on client side (in other words on PC which is used to view page). On server side it is stored only as any other kind of file. To be able to create "client-server" solution you have to be able to run code also on server machine. I did not found any free hosting server which allows to run java. But in many cases they allow to use PHP which runs enteirly on server side. Check for this - it may be right solution for you.

  • Client/Server application question

    Hey everyone,
    I am trying to exercise on a client/server application. My client application is similar to this one [http://java.sun.com/developer/onlineTraining/Programming/BasicJava2/Code/SocketClient.java]. However this client works like this: it sends text through socket -> receive response from server. I am trying to find a way so that the client can receive and process messages from the server asynchronously. That is the server can send messages anytime (not just as a response to the client) and the client should always be able to receive messages from the served at any time, and not just after it sent something. I believe that multithreading would be the answer, listening to the output stream and sending through the input stream should be run in parallel, but I can't find a way to implement it. Your help is appreciated. Thank you.

    I knew that :-) but how exactly?
    How do I translate this code into two runnable classes which will communicate with the original class and its gui?
    //Send data over socket
              String text = textField.getText();
              out.println(text);
           textField.setText(new String(""));
    //Receive text from server
           try{
           String line = in.readLine();
              System.out.println("Text received :" + line);
           } catch (IOException e){
          System.out.println("Read failed");
                 System.exit(1);
      }

  • Client/Server UDP question

    Hi,
    I am writing a server program which both sends and receives UDP messages to various clients.
    What I want to do is both send and receive on the same port. I'd like the receiving to be done on the same thread (and therefore on the same socket). However I'd like the sending to be done in multiple threads (1 per client).
    The problem is, I don't think I can use the same socket object to send to all of the clients. I'm thinking there would be collisions/problems with the multiple threads sending on the same socket.
    However, if I create multiple sockets for sending, and one socket for receiving (all bound to the same port), is there a way to tell the "sending" sockets to only send (i.e., not receive)? Or is this automatically done simply because I never do a socket.receive on those sockets? Or do I need to pick a different port for sending rather than receiving?
    What I want to avoid is listening to the port on my "listen" socket, but having that data show up on one of my "send" sockets (and therefore never seen, because I don't do a socket.receive()).
    I've looked in the forums/tutorials for this, but nothing I've seen addresses needing to send from multiple threads, or needing to have listening on a separate thread (which I need to do to prevent having the receive() block the send()). Please bear with me if this is a stupid question; I'm new to network programming, especially UDP.
    Any help would be greatly appreciated!

    it shouldn't be a problem to send from multiple threads and receive on another thru the same UDP socket. If you want to send from a different socket, that's fine too... except that the other side will need to know to send responses back to your receiving socket (port) and not the "source" of the packets they receive.
    I'm not sure you can mark the socket for send or receive only, but it really doesn't matter. Just don't read from the sending one or write to the receiving one. An incoming packet isn't going to block an outgoing packet, or an outgoing packet isn't going to push an incoming packet out of the way. The pipe analogy for socket connections isn't so literal like a real pipe where water could only really go one way.
    It's the threads that would block on while waiting for input, which is why you need separate threads, but not necessarily separate sockets.

  • Client server basic question

    I have a web service that returns byte arrays to the client. First a byte array is returned and the server gets the acknowledgement, then the next byte array is sent and so on. But I don't have much idea how to implement it. How can I resume from where I stopped at the server side? Can anyone give me some idea so that I can proceed?
    Thanks.

    Thanx for your reply!
    So if I have a relatively small number of clients that do a lot of data processing, then the following scenario would be ok to do:
    - a (rich) client connects to the J2EE server with some EJB call.
    - the server creates a queue for that client and that session.
    - the client creates a MessageConsumer for that queue.
    - the client sends a message based data request to a server queue.
    - a MDB processes that data request and sends a reply message to the clients "session queue"
    Would that be ok?

  • Help please with Client Server Connection

    I have created a server and a client but I have no clue how to execute both on my computer. Can anyone please help me??

    Problem solved!
    It took:-
    4 day's of discussing this issue with BT though the usual automated telephone answering palava and talking to at least 4 different support team people, all from/in another country with different understanding, communication and training levels.
    Running numerous Line tests
    Trying 3 different routers (including having to find the old ones in the shed!)
    Checking speeds on an iMac, Macbook Pro, iPad and even a Playstation
    Methodically checking the settings of the router detail by detail
    Running other speed testers
    Changing cables
    etc. etc...
    I finally realised that whilst my connection speed was 8mbps, BT had set an IP Profile for the line of 2mbps.  This is not alway's obvious when you run their speedtester as that site doesn't alway's show it to you!
    Having rung them again and told them of my discovery I now have between 6 & 7mbps and can hopefully watch steaming video without interuption.
    An awful and unneccessary experience - Well done BT!

  • Loss of Client/Server Connection through

    Hello,
    i do have a big problem. We loos connection after 10 minutes between oracle-client and server.
    It is install a firewall between client and server and the firewall will close this ports after 10 minutes, witch dont user it for the datatransfer. I will hold this connection for the longer time, because on the server runs jobs for a longer time as 10 minutes. When i will try to connect from the oracle-client to the oracle-server, then i get problem with this jobs on a server, because it will start the same job which to run on a server since few minutes.
    Can anyone help me, please.
    Thanks Frank
    [email protected]

    Thanks for the answere.
    i had find out, how can i hold the connection.
    Enable "Dead Connection Detection" i the sqlnet.ora. Set sqlnet.oxpire_time = 10 (10 Minutes is default.)
    As soon as the Firewall will clost the connection in 10 Minutes, then set less as 10 Minutes. Use 9 Minutes or less........
    Important: Reset the Oraclelistener unter "Services" !!!!
    visite website http://asktom.oracle.com
    Frank Oehmichen

  • Calling functions over client server connection

    i am currently sending an object between client and server that contains getters that have string variables that are evaluated by a large if statement in the reciever. i was wondering if it is possible to do this a simpler way rather than having a large if statement for all fo the possibilities that are contained in the object.getAction.
    ie:
    client sends object to server where getAction() = count
    server receives object and evaluates the getAction() in a large if statement like so
    if object.getAction()=="hi"
    hi();
    else if object.getAction()=="hello"
    that();
    else if object.getAction()=="count"
    count();
    else if object.getAction()=="multiply"
    multiply();
    is there a simpler and quicker way to do this? i have thought of ways that would just allow a direct calling of a function on the server or client side but i don't see how it would be possible.
    something like this...
    String function = object.getAction()
    function(); -- where function is the string variable it receives from getAtion();
    I know it is not possible to call a function from a variable, but that was my idea. any input or ideas wold be helpful.

    If your server has an array of predefined Runnable objects and the return value of the getAction() method is an int, then
    new Thread(rarray[object.getAction()]).start();In Java, only closure-like object is Runnable.

  • Client Server Connection in Evaluation Version

    Hi,
    I am getting an error while connectng a clinet machine to a server that is running with SBO evaluation version. Error is "Connection to the license server is failed". Any one knows whats going wrong?
    Thanks,
    Siddiq

    Hi Gordan,
    Thanks for your response. The matter has been resolved. It was because of antiware.
    Thanks again.
    Siddiq

  • Client Server Socket question!

    Hello all,
    how are ye.
    I would like to ask a question.
    I would be graterful for any suggestions relating to my query.
    i am creating a program that needs to communicate over a network
    it has two parts
    P1) sends request to the other program mainly about account information and
    also updates.
    P2) the second part among other things listens for messages on a port from Program One.
    but also must be able to interface with the user who is using Program Two, the user should be able
    to view account info update delete search etc.
    my problem is how will i get the second program todo both operations do i need
    to create another thread that listens and if i do this. will i be able to
    like add info to a database from this thread.
    Mainly i need suggestion as to how i should implement a scenario like the above.
    I am sorry if i havent spelled out my problem in a clear manner.
    Very grateful for any assistance.
    Thank you all :-)

    http://java.sun.com/developer/onlineTraining/Programming/BasicJava2/socket.html
    That should help you out.

  • Client Server mode for time ten connection

    Hi, I am new to Times Ten and got a question for running TimesTen in Client Server Mode. When it is running in Client/Server mode:
    Does the database just run like a regular remote database ?
    Is there security for the remote application, such as userid/password ?
    Is there any limitation on number of remote connection can concurrently connect to the DB ?
    Does it use the JDBC or it has to be the native library ?
    Thank you for your help
    Henry

    Hi,
    With regard to your questions regarding TimesTen client/server mode:
    1. Does the database just run like a regular remote database ?
    I'm not sure exactly what you are getting at here but yes, I would say that it runs like any other c/s database. If you can be more specific in your question then I can give a more precise answer.
    2. Is there security for the remote application, such as userid/password ?
    If the TimesTen instance to which you are connecting was installed with Access Control enabled then yes, normal userid/password security applies. The client application must provide a valid TimesTen userid and password in order to establish a connection.
    3. Is there any limitation on number of remote connection can concurrently connect to the DB ?
    Subject to O/S resource limitations, a single instance of TimesTen (i.e. the TT server) supports a maximum of 9,999 concurrent client/server connections. Each individual datastore supports a maximum of 2047 concurrent connections (direct and client/server).
    4. Does it use the JDBC or it has to be the native library ?
    The TimesTen JDBC driver supports both direct modde and client/server. The TimesTen ODBC driver is provided in both direct mode and client/server versions. The JDBC driver uses the ODBC driver (it is a type 2 JDBC driver) and so the client machine requires a TimesTen client installation to use either ODBC or JDBC to access a remote datastore.
    Chris

  • Publishing .fla project including client - server socket connection

    Hi,
    I have designed with Adobe Flash Professional CS5 a .fla project that integrates a client - server connection.
    After publishing it, I have the following issue:
    - when running the generated .exe file for Windows, then the connection to the server works perfectly
    - but when I am running the published .html file, then nothing is sent to the server.
    I have tried to change the Publish Settings.
    When setting the Local Playback Security in Flash menu to "Access network only" instead of "Access local files only" then the last packet that was send using the .exe file is resent once and that's all (the html client does not receive the response from the server and the next connection attemps generate data transfer).
    I guess I have to change some security settings somewhere but I didn't find which.
    Does anybody have a hint ?
    Thanks.

    Hi again,
    I was finally able to solve the issue.
    I did not get any error message when using firefox, but using iExplorer provided me this error:
    "Local-with-filesystem SWF files are not permitted to use sockets"
    Googling did then allow me to find the solution here:
    http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.htm l
    The local locations on which I store my html page during the development has to be added to the trusted locations in the global security settings.
    Hope it will help some other people.
    Best regards

  • Client server vs direct linked

    Hi, when reading TimesTen documentation it shows that client / server connections are much slower than direct linked, but direct linked require that the application be running on the same machine as the timesten datastore.
    For a clustered environment what sort of configuration is recommended so that all nodes have access to the same data?
    Thanks

    It is of course true that client/server connections are significantly slower than direct mode connections but typically they are still quite a bit faster than a regular RDBMS.
    Before deciding on an architecture i would recommend evaluating the performance of client/server connections to see if they meet your requirements.
    There are two main architectures that are possible here (I'm assuming that you want a highly-available configuration):
    1. A central TimesTen active/standby pair on two machines. The applications run on the rest of the machines in the cluster and access the datastores in client/server mode. If there are some components that need better performance than C/S can provide they can run on the active/standby nodes using direct mode. This setup is easy to configure and easy to manage.
    2. Partition the data across multiple datastores distributed across all the cluster nodes. If there are 4 nodes, each will have 4 datastores; one will be the local 'master' for 25% of the total data and the others are read-only copies of the other 75% of the data. TimesTen replication is used to keep all the copies synchronised. Applications can use direct connect mode to access all of the data but applications at a node can only directly update the 25% of data mastered at the local node. Updates for other data must be directed (by the application) to the relevant 'master' node. Essentially, the workload must be partitioned to match the data partitioning. This setup is more complex to configure and more complex to manage but potentially could give better overall performance.
    This requirement is not that uncommon and we are considering adding some kind of automatic partitioning/distribution functionality to TimesTen in a future release.
    Chris

  • [SOLVED] MPD clients slow connecting

    I've noticed an slow response by first time client->server connecting on my fresh Arch installation.
    akill@arx ~ % time mpc
    System ot a Down - Aerials
    [playing] #2/2 0:36/3:55 (15%)
    volume: 61% repeat: off random: off single: on consume: off
    mpc 0.00s user 0.00s system 0% cpu 5.145 total
    Like you see simple mpc call needs 5 seconds, same for ncmpcpp. This only applies when client is starting, so after the client connects it works normal like play, pause, switch song...
    There are no log errors, my /etc/mpd.conf is the same one from my netbook and there it works fine.
    Thanks in advance.
    Last edited by Asmir (2013-10-14 09:04:53)

    Possibly not related (but maybe helpful if someone stumbles upon this in the future); but mine started to take ~30 seconds to connect as well. Turned out that having ip6tables set to drop all connections resulted in it waiting for connection on ::1 to timeout before attempting ipv4.

Maybe you are looking for

  • M7747c

    The current SATA Hard Drive is having problems.  The message Hard Drive Failure is Imminent is appearing.  The drive is 320 GB.  What is the largest size this system can handle?  

  • Some questons about z61t

    Hello everybody recently I got for myself a z61t-9443. I don't want this laptop to be a replacement of my desktop, I would like to upgrade it abit but my knowledge around laptops is really poor. So here are some questions. Questions about mini-pcie 1

  • Using an SAS2008 Cube as a data source for BI Publisher errors

    Hi All, I am trying to use a SAS 2008 cube as a data source for a report in BI Publisher. When I defined the data source under the admin section I gave it the following details: Data Source=ntsasqa01;Provider=msolap.3;Initial Catalog=WWPR_SMG With a

  • I am unable to import Raw files taken with my new camera Canon SX60HS.

    I am running Elements 12, I have just downloaded and installed Adobe Camera Raw v 8.7.1 as it indicates that it supports raw files taken with this camera model.  I continue to get the error that nothing imported as it did not contain supported file t

  • Transport window legend

    Hi, In the top right hand corner of the transport window, there is a triangle which is suppossed to give you access to the legend (and position slider). When i click on it these 2 options are greyed out? I would really like to be able to get the lege