Applet to servlet connection failed using plugin 1.3

Hi,
I tried to send a serialized object from an Applet to a Servlet. It worked well until I installed the Java plugin version 1.3.
Now I can open the Connection, create an ObjectOutputStream and write the object but nothing happens then. The Servlet doesn't start working.
I don't receive an exception or error message, neither in Tomcat or Apache log-file nor in the plug-in console.
here is my code example:
String location = " http://localhost/com/spes/test/TestUploadSoundServlet";
URL servlet = new URL( location );
URLConnection servletConnection = servlet.openConnection();
// inform the connection that we will send output and accept input
servletConnection.setDoInput(true);
servletConnection.setDoOutput(true);
// Don't use a cached version of URLconnection.
servletConnection.setUseCaches (false);
servletConnection.setDefaultUseCaches (false);
// Specify the content type that we will send binary data
servletConnection.setRequestProperty ("Content-Type", "application/octet-stream");
ObjectOutputStream out = new ObjectOutputStream(servletConnection.getOutputStream());
out.writeObject(soundClass);
out.flush();
out.close();
Is there anything wrong in the code above?
thanks for help...
mfg maze

since the Apache server is listening on port 80 I thought it is not necessary to use the port number. I tried now with the new URL:
String location = " http://localhost:80/com/spes/test/TestUploadSoundServlet";but it still doesn't work.
thanks for your help

Similar Messages

  • Ftp connection failed using iWeb

    i am trying to publish my website using iweb 3.0.4. everytime i test my ftp server i keep getting connection failed. i know for a fact that my username and password, and all related ftp server settings are correct. my webhost is godaddy and have quadrouple checked my username and passwork are correct.
    i have another site also hosted by godaddy and published with iweb, and i have repeated exactly in the same way, but continue to get 'testing failed... please verify settings...' window, and therefore cant publish. very frustrated - any thoughts please? thanks much, c

    Try the following:
    delete the iWeb preference files, com.apple.iWeb.plist and com.apple.iWeb.plist.lockfile, that resides in your Home() /Library/Preferences folder.
    go to your Home()/Library/Caches/com.apple.iWeb folder and delete its contents.
    Click to view full size
    launch iWeb and try again.
    OT

  • Connect failed using javamail

    hi all,
    i am trying to read email using javamail. But it always give an error result as below :
    javax.mail.MessagingException: Connect failed;
    nested exception is:
         java.net.ConnectException: Connection timed out: connect
         at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:161)
         at javax.mail.Service.connect(Service.java:288)
         at javax.mail.Service.connect(Service.java:169)
         at email.retrieveemail1.receive(retrieveemail1.java:48)
         at email.retrieveemail1.main(retrieveemail1.java:22)
    Caused by: java.net.ConnectException: Connection timed out: connect
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(Unknown Source)
         at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
         at java.net.PlainSocketImpl.connect(Unknown Source)
         at java.net.SocksSocketImpl.connect(Unknown Source)
         at java.net.Socket.connect(Unknown Source)
         at java.net.Socket.connect(Unknown Source)
         at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:233)
         at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:189)
         at com.sun.mail.pop3.Protocol.<init>(Protocol.java:94)
         at com.sun.mail.pop3.POP3Store.getPort(POP3Store.java:214)
         at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:157)
         ... 4 more
    i am using fastmail and using this pop3 address : mail.messagingengine.com
    is there any possibility that this problem related with proxy server? or i just put a wrong pop3 address?
    any advice will be appreciated....
    thx in advance.
    Edited by: inair on Feb 12, 2008 2:38 AM

    Oracle is not completely up... or is still in shutdown mode.
    start it manually with :
    sqlplus / as sysdba
    shutdown imemdiate;
    startup;
    exit;
    now, restart SAP.

  • "Connection failed" using smb to Win 7 64-bit shared folder

    Hi,
    I am a new Mac user and was unable to find any suggestion for a solution to the problem I am experiencing.
    I use a folder on my PC to store video files. It is shared and the Mac connects to the address smb://biblioteket. This usually works fine, but sometimes I get a "Connection failed" error message. I connect through a gigbit wired ethernet connection.
    Some other characteristics:
    - If I restart my PC and reconnect, it works again - every time.
    - I can connect to the PC using Teamviewer even if I get the error message, meaning there is a connection between the computers.
    - The error will always show up if I try to copy large files from my Mac to the shared folder on the PC. I get a error message during file copying, after that the mounted drive is inaccessible and the "Connection failed" error message appears.
    Any suggestions?

    Hi,
    So I did what I always do to get the error message. I moved about 25 files from the Mac to the PC. Total size was about 5 gb. About half way through, I get the following error message:
    The Finder can’t complete the operation because some data in “(filename(.avi” can’t be read or written.
    (Error code -36).
    So I retry, but this time the mounted drive has disconnected and get the following error msg:
    The operation can’t be completed because an unexpected error occurred (error code -41).
    This happened with a new user (administrator). Any ideas? Thanks in advance.

  • Applet doesn't retrieve classes using plugin

    If I run my applet from a dialup it works. If I run it from behind a proxy it won't. I can run the SwingSet2 demo and it prompts me to login. Mine just stalls after trying to connect to the first one right about where it should prompt me to login. Any Ideas?
    Mark

    It happens automatically in IE. The plugin is set to use the browser's proxy settings(default). I can run the Sun demos through the proxy. I just can't run what I've done. I'm thinking it could be the combination of having to go through the proxy an having to login to the website(NT). Maybe some file settings too. I can bring up plain html pages from the site.
    mark

  • Different things on Applets and Servlets

    I use Eclipse. I create two projects: applet and servlet (deploy on Tomcat). One is with the function main, the other has doGet. In these functions I write the same string:
    Mac.getInstance("HmacSHA1");
    But when I run applet - it's ok, when I deploy servlet and run on Tomcat - there are exception: java.security.NoSuchAlgorithmException: Algorithm HmacSHA1 not available
    How to make it availible at servlet?
    Message was edited by:
    AntonVatchenko

    The 2 apps (applet versus servlet) are likely using different versions of the Java runtime (and / or security extensions to them). And on one version that security algorithm exists (is built-in, or added as an extension in your JRE's lib/ext folder or something like that); while on the other the algorithm does not exist.
    Make the J2EE container (the one running the servlet) use the same version of Java as the applet is. I suppose that's just a hint though, that your next question will be something like "Ok, how do I do that?". My job was just to point you in the right direction. Hopefully I've done that.

  • About connecting applets to servlets

    Hi friens,
    I already posted regarding this problem twice but there were no replies. i am really desperate as it is eating up my time. I thought once more i will elaborate it.
    I am using the following code to connect an applet to servlet on my tomcat.
    /////////// swing code ////////////
    URL url = new URL(getCodeBase() + "MasterServlet?handlerName=SendGraphData&sessionid="+sessionid);
    URLConnection con = url.openConnection();
    con.setUseCaches(false);
    con.setDoOutput(true);
    con.setRequestProperty ("Content-Type", "application/octet-stream");
    ObjectOutputStream obj;
    obj = new ObjectOutputStream(con.getOutputStream());
    obj.writeObject(selectedNodes);
    obj.writeObject(saveType);
    obj.flush();
    obj.close();
    If i just use the connection to receive objects from servlet it is working fine. But if i use the statement "con.getOutputStream()" in the above code, connection is not getting established with the servlet at all (it is not going into the servlet). But some times it does go into the servlet but throws "java.io.EOFException" at the statment "request.getInputStream()" , which i call in my servlet code to read the objects sent by the applet.
    i already wasted one week on this. so, pls try to bail me out.
    bye
    steve

    Here is what I have. I did not use ObjectOutputStream as you did, however - just XML. I hope this is useful...
    url = new URL(sTheURL);
    con = url.openConnection();
    con.setRequestProperty("Content-Type", " application/x-www-form-urlencoded");
    con.setDoInput(true);
    con.setDoOutput(true);
    con.setUseCaches(false);
    con.setDefaultUseCaches(false);
    sXML = URLEncoder.encode(sXML);
    sXML = XML + "=" + sXML;
    OutputStream out = con.getOutputStream();
    out.write(sXML.getBytes());
    out.flush();
    out.close();
    InputStream is = con.getInputStream();
    BufferedReader br = new BufferedReader(new InputStreamReader(is));
    String line=null;
    while( (line = br.readLine())!=null)
         respBuf.append(line);
    br.close();

  • Applet Servlet Connection

    Hi,
    I am trying to develop a chatroom application. I am using a applet as client which communicates with a servlet by recieving and sending a serialized object.
    This is done by using the URLConnection class.
    If one user send a message to the servlet then the servlet needs to send that message to all user in the chatroom.
    Herefore I need the connections to each applet. I need to store each connection to the applet of the user.
    How can implement this?
    Thanks

    Maybe you should open a socket connection from the applet to the servlet instead of using URLConnection. There is a tutorial on sockets on the java.sun.com site.

  • Hi there, I am trying to connect to my server at work from home using a vpn connection. It connects fine and the time ticks along, but when i click go - connect to server, it comes up with connection failed. Please help!

    Hi there, I am trying to connect to my server at work from home using a vpn connection. It connects fine and the time ticks along, but when i click go - connect to server, it comes up with connection failed. Please help!

    ... when i click go - connect to server, it comes up with connection failed.
    If you're trying to connect to a Bonjour server on the remote network, that won't work over a layer 3 VPN. Use something like Hamachi or one of the SSH-tunnelling Bonjour proxy apps for that.

  • Problem in connect database using applet

    hi
    please
    i want open database in page html with use Applet
    i use this code but database not work in the my page
    if this code have problem
    please correct this code to open database in page html
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    con = DriverManager.getConnection(
    "jdbc:odbc:DRIVER=Microsoft Access Driver (*.mdb);DBQ=C:\\hwzyfa.mdb ");
    sta = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
    ResultSet.CONCUR_UPDATABLE);
    res = sta.executeQuery("select * from aha");
    this is my code
    package orcle;
    import java.sql.*;
    import java.awt.*;
    import java.applet.*;
    import java.awt.event.*;
    <applet code="test.class" width=200 height=200>
    </applet>
    public class Applora extends Applet implements ActionListener
    Connection con = null;
    Statement stmt = null;
    ResultSet rs = null;
    String str=null;
    TextArea ta;
    public void init()
    ta= new TextArea(10,30);
    add(ta);
    Button b1 = new Button(">>");
    add(b1);
    b1.addActionListener(this);
    ta.setText("Initialization...\n");
    public void start() {java.applet.AudioClip a=  Applet.newAudioClip(Applora.class.getResource("a.mid"));
       a.play();
    public void actionPerformed(ActionEvent ae)
    ta.appendText("Inside actionPerformed\n");
    try
    ta.appendText("Inside try block\n");
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    ta.appendText("Class loaded\n");
    /********** upto this point it works fine **************/
    con=DriverManager.getConnection("jdbc:odbc:DRIVER=Microsoft Access Driver (*.mdb);DBQ=C:\\hwzyfa.mdb ");
    ta.appendText("Connection created\n");
    stmt=con.createStatement();
    ta.appendText("Statement created\n");
    rs=stmt.executeQuery("select * from aha");
    ta.appendText("Resultset created\n");
    while(rs.next())
    str=str+rs.getString(2)+" "+"\n";
    //str=str+rs.getString(2)+" "+"\n";
    ta.appendText(str);
    con.close();
    stmt.close();
    rs.close();
    }catch(ClassNotFoundException cnfe){System.out.println("Class Not found "+cnfe.getMessage());}
    catch(SQLException sqle){System.out.println("SQL Exception "+sqle.getMessage());ta.setText(sqle.getMessage());}
    catch(Exception e){ta.setText(e.getMessage());e.getMessage();}
    }

    i want access to database in page html with use AppletFirst of all, that doesn't make any sence, if it's a single user application make it a java
    application.
    If it's a multu user application make it a client server where the web server connects to
    the database when the client requests a connection.
    When the applet connects to the database any client running the applet needs a
    connection to your database server, the client needs the jdbc drivers and the client's
    jre needs to find them (set classpath with runtime parameters or set the classes in
    javadir lib). After that the client needs to change thiere java.policy or you need to sign
    the applet.
    Needless to say that's a lot of trouble. And if you go through all that trouble the client
    can de-compile your applet and see the connection to the database server and the
    server name. Now the client can destroy your database or worse see date it is not
    supposed to see.
    Since you are a brainless ... who needed to post this question 6 times did not respond to any of my post in your other threads I can just say good luck with your problem.

  • Using applets as servlet front ends

    hi,
    i am looking for some examples
    thx
    Marrek

    See http://www.altio.com/ for a demonstration of an applet frontend to a servlet based server framework. If it's code samples you want, then there is nothing special about connecting applets to servlets, just find an example of an applet that connects back to the server it was launched from.

  • When trying to use sharing, I get Connection Failed

    When trying to use my OSX 10.75 laptop to access files on my OSX 10.6.8 laptop it says "Connection Failed". In the console, it says:
         Finder: SharePointBrowser::handleEnumerateCallBack returned -6600
    File sharing is turned on in the target computer. I have a user account setup for file sharing. That user account has read/write access setup.
    I have tried to turn off sharing and turn it back on.
    I have tried to remove the shared folders, make new folders and then share those new folders.
    I have tried both guest access as well as access with a specific user account.
    Nothing works. I get the error message above no matter what I do.

    iOS: Unable to send or receive email
    http://support.apple.com/kb/TS3899
    Can’t Send Emails on iPad – Troubleshooting Steps
    http://ipadhelp.com/ipad-help/ipad-cant-send-emails-troubleshooting-steps/
    Setting up and troubleshooting Mail
    http://www.apple.com/support/ipad/assistant/mail/
    iPad Mail
    http://www.apple.com/support/ipad/mail/
    Try this first - Reset the iPad by holding down on the Sleep and Home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons. (This is equivalent to rebooting your computer.)
    Or this - Delete the account in Mail and then set it up again. Settings->Mail, Contacts, Calendars -> Accounts   Tap on the Account, then on the red button that says Remove Account.
     Cheers, Tom

  • How to run a servlet in eclipse using "SAP Portal Plugin"  ( not tomcat)

    Hi All
    I'm just trying to create a simple servlet in Eclipse using SAP Portal Plugin but I couldn't find any document.
    I have an eclipse 2.1
    EP6 SP2 patch 5
    SAP Portal Plugin
    I created a Portal Application Project.
    I created a simple servlet and save it under src.core directory.
    My question is as follow:
    1) Which directory I should put in the file web.xml?
    2) Do I export this as *.par file?
    3) When I export it. Can I just call the servlet from the url?
    Anyone help.. I really appreciate.
    thanks much.
    Jen

    Hi,
      Portal plugin is used for developing SAP Portal applications ie Java iviews.
    There is a set of procedures to develop Java iViews . You can develop either AbstractPortalComponent which is more or less equivalent of servlet in ordinary java world or JSPDynPage which is equivalent of JSP.
    These plugins are used to develop any of the above portal components. If you are developing java applications for portal then you have to develop either of the above using the tools. These portlets( portal applications runs on Portal run time)
    But servlets can run on J2EE itself.
    But if your requirement is to develop servlet then you can create ordinary java project and deploy that in the J2EE server as like in any app server.
    Regards,
    Abdul Raheem .S

  • We are receiving a "Secure Connection Failed" error message when using Firefox Version 37.01. What is the remedy?

    We have multiple websites that do not launch now as a result of the recent upgrade from Firefox version 36.04 to version 37.01. We received "Secure Connection Failed" error messages which indicate that the connection was interrupted while the page was loading, and that the page you are trying to view cannot be shown because the authenticity of the received data could not be verified. Please explain why this is happening, and if a fix will be issued soon by Mozilla, as everything was operating normally prior to the most recent Firefox upgrade. Alternatively, please identify browser settings that can/should be changed in order for Firefox to access these basic Internet sites (that are completely accessible using other browsers such as IE and Google Chrome). Thank you.

    ''rahuldecoded [[#answer-718441|said]]''
    <blockquote>
    https://support.mozilla.org/en-US/kb/secure-connection-failed-error-message
    </blockquote>
    FYI, I work with the original poster. I looked at the suggestions on that page but none were the issue. Then I found this thread:
    https://support.mozilla.org/en-US/questions/1056488
    And that appears to be the problem we and others are having.

  • Using MVC with Applet inside Servlet

    Hello fellow Java developers,
    I want to implement the Model View Controller concept inside a Bean Applet combination running in a servlet environment.
    When my model (the Bean) changes, I want my Applet (the View) to get notified so it can get the update from the Bean. The Applet is incorporated inside the jsp page (e.g. the servlet). The Bean is known inside the jsp. How do I make that same Bean known inside the Applet?
    When I create a new Bean during init, or in the constructor of the Applet, I get a complete other reference than the Bean inside the jsp. So, when I ask information from the Bean, I often get NullPointerExceptions, because I am referencing the wrong Bean.
    Does anyone have a solution for my problem?
    Regards,
    Michel

    hi,
    a servlet is server side object, an applet is client side object.
    For the communication, you should try HttpUrlConnection from applet to servlet.
    another way is tu use ejb, or rmi communcation

Maybe you are looking for

  • After updating to iOS 5.0.1 iPhone 4 having some Apple ID issues on apps

    I upgraded my iPhone 4 to iOS 5.0.1 and when I went to log in with my Apple ID it told me that I needed to have an email instead of a name for my Apple ID. So I went online and updated my ID to my email but now my phone says that I have apps that nee

  • How to Hide page in interactive form

    Hello All, I have developed the Interactive form for one of the HR process. Form is pread across the three pages. My requirment is to hide the second page based on some condition. I have tried JAVA script to hide the page using below syntax but its n

  • Trouble with bt sport app

    Is anyone else having trouble opening bt sport app?? Solved! Go to Solution.

  • Again about tnsnames.ora

    thx kmensah. but I want to use tnsnames.ora. in that document introuduce the way that I used before. but I want way of using tnsnames.ora .

  • Fonts are missing in keynote since I use iOS5? help!

    in all my slides for an important presentation the text is disordered because fonts are missing since I downloaded iOS5. Can somebodiy help me?