HttpURLConnection and Applet

I have created an applet and compiled like this because IE was showing ClassNotFoundException
javac -target 1.1 URLValidatorApplet.java
now the the browser is displaying applet but it is not working it hangs when the code reaches to connect to my servlet
http://www.puneetind.com/URLValidator.html is the url for my applet
and it trys to connect http://www.puneetind.com:8080/servlet/URLValidatorServlet
but it hangs
you can try the above urls and see my applet

just take a look at you java console window, and you will se the exception.
juergen

Similar Messages

  • Net addresses and Applets?

    Is it at all possible to query whether a certain web site is availble via an applet. I have been trying numerous ways (URL, URLConnection, HttpURLConnection, and even INETAddress) but always seem to get security errors.
    I do understand that applets have very (and understandable) security restrictions, but all I need is in effect a "ping" applet, to acknowledge whether or not a web site (IP Address) is available or not...
    Does anyone have any advise, it would be greatly appreciated!
    James.

    James
    I suspect that the security sandbox will stop any attempt by an unsigned applet to communicate with web servers other than the one your applet is hosted from.
    Your options depend on which version of Java your are using (and which browser you want to support).
    Using Java 2, you can either
    1) Sign the applet using an RSA certificate from a commercial provider - this will allow anyone with the plug-in to run your applet easily.
    2) Change your policy file settings - this is too fiddly for "off the street" users, but will allow you to test your applet. If you search the forum for "policytool" you will find instructions.
    Using Java 1.x you can sign the applet in various ways, or use the Netscape Capabilities API (not sure about the name) to work around the security settings with Netscape users.
    That probably isn't what you wanted to hear, but hope it is helpful
    Regards
    Matthew

  • Problem with HttpURLConnection and HttpSession.

    Hi,
    Problem with HttpURLConnection and HttpSession.
    I created a HttpSession object in my main class and then called a URL via HttpURLConnection.
    I tried to access the same session object from the servlet called by the URL . but the main session
    is not returned a new seperate session is created.let me know how can we continue the same session in
    the called URL also which is created in main class.
    Thanks
    Prasad

    You are not supported to create a HttpSession by java client. Only J2EE web container can create it.

  • HttpURLConnection and URLConnection

    hi,
    what's the difference between HttpURLConnection and URLConnection ?
    When should I use the first and when the second one ?
    thanks

    The Javadoc shows the relationship. Cast a URLConnection to an HttpURLConnection when the URL protocol is HTTP.

  • 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

  • JDev3.0's JSP and Applet works on NT but doesn't work on Win98, why?

    JDeveloper3.0 works fine on WindowNT machine when I run JSP files and Applet, but at home the JDeveloper3.0 cannot trigger the browser to display the result on my Windows98 machine when I run the JSP files or Applet. Why? How can I make it works for me at home. Other tools, such as J++6.0 and JBuilder work with Applet on the same machine. Who can help me?

    James,
    The JDeveloper 3.0 design time environment is not supported on Windows98. Some functions might work under Win98 but they are not supported.
    Sorry!
    Regards,
    Arun

  • Regarding communication between JSF and applet.

    Hi all,
    I have to send a array of int value from JSF to the applet method and vice versa,
    so how can I do that?
    Is there any straight forward way is there?
    Or I need to use javascript in between applet and JSF for communicating.
    If this is case can give some links so that I can go through it.
    What I need is, I have jsf table(grid) when I select a row from table, for the selected row I have to display selected row ID in applet and vice versa.
    Any suggestion or links will be appreciated, thanks in advance.
    Thanks
    daya

    thanks and sorry for late reply, let me go through the link,
    i have tried with JavaScript, i got stuck, i need to call a JavaScript method for JSF component event listener. I searched in Google but no help regarding same.
    Actually what I need is, I have JSF Component i.e. GridView(Table) and applet in a page. And for each row selection in GridView(table) I need to call a javascript method (with column value), and vice versa.
    Can you give suggestion or any link so that can proceed further.
    and i am able to communicate between applet which are included in the page
    Thanks
    Daya

  • Adf faces table and applet in jsf page navSubmit not working in IE

    Hi
    I have a jsf page with adf faces table and applet , previous / next navigation is not working for my table when i add the applet to the same page , it is working in firefox but not in IE .
    I have no clue what to change , can any one help. below is the sample code for my jsf page
    Best regards
    Srinivas
    Code follows, not sure how to format the code here
    <h:form>
    <af:panelPage title="Test Adf faces table and applet">
    <af:panelHeader text="Orders">
    <af:table value="#{bindings.Orders.collectionModel}" var="row"
    rows="#{bindings.Orders.rangeSize}"
    first="#{bindings.Orders.rangeStart}"
    emptyText="#{bindings.Orders.viewable ? 'No rows yet.' : 'Access Denied.'}"
    id="orders" >
    <af:column sortProperty="order"
    headerText="#{bindings.Orders.labels.order}">
    <af:commandLink text="#{row.order}"
    id="orderNumber"
    onclick="showOrder(#{row.order})"
    disabled="false"/>
    </af:column>
                   </af:table>
    </af:panelHeader>
    <af:objectSpacer width="10" height="10"/>
    <af:panelBox>
    <f:verbatim>
    <div id="appletDiv">
                        <applet here />
                        </div>
    </f:verbatim>
    </af:panelBox>
    </af:panelHorizontal>
    </af:panelPage>
    </h:form>

    Sorry about the format, it looked okay when i previewed it , now it looks like terrible

  • Package and applet

    I am reading about Zhiqun's Java Card book,
    and I wonder about the relationship between a package and an applet.
    Am I right in saying:
    1. An applet comprises one or several packages
    2. A package only belongs to one applet
    3. One package is one group context
    Hope to get your guidance.
    B.R.
    RuHE

    Refers to your assertions,
    Please help me..
    Case 1
    I have package A. Package A contains 2 class (A1 & A2 ) and 2 package (B and C).
    Then, I make 2 applet, they are applet-B (for package B) and applet-C (for package C).
    When simulationi in JCWDE, applet-B and applet-C have no problem. But, in CREF, applet throw exception and status word is 6443.
    Case 2
    When I try to include class A1 and A2 into package B and C, so package A is empy. Surprisingly, applet-B and applet-C can run in CREF and JCWDE. I don't know, what's wrong in case 1.
    Can you give me explanation or explanation about problem in above...?
    Best Regards,
    Wiwit

  • Appletviewer and applets

    Hi!
    I am using j2sdk 1.4.0 under linux. I have been creating an applet. The screen refresh is tied to a timer. However, the screen refresh gets very slow after 2 - 5 seconds after the applet has been started. If I move mouse in applets window, the refresh gets fast during that time.
    The applet code is very simple: timer calls repaint method of the applet and applet's paint method just draws new picture to the screen using drawImage.
    Anyone run into same problem? What could be wrong?
    Thanks
    Sammy

    ok but whats the problem the fast refreshing??
    if so then u have two options:
    1)double buffering
    2)if u dont need the re-paint let the java do it for u dont overide it
    denny

  • Can I use AWT and Applets in a J2EE project???

    Hi,
    I adore applets and the package AWT... And I would like to know if some way exists to integrate my applet with my application J2EE... I want to use these in the vision tier in a J2EE(EJB) project...
    How can I make that my applet acts as an observing process of my model??? If the JVM will be informed on any alterations in the model will be the JVM of the server while my applet will be being executed for the JVM of browser...
    []'s
    Ary Junior

    I have a J2EE application, for which I have a module which is used by system administrators. this module is completly written in Java swing.
    and it does talk to my EJBs.
    If you don't have a firewall in your application, then you can directly make your applications in awt, swing and applets talk to EJBs. if you do have a firewall, then just write a web-service wrapper over your EJBs and other J2EE components and use them from desktop applications.
    It seems that you want to implement a kind of a applet based monitor application for your J2EE EJBs on the server. Applets cannot directly monitor your EJBs.
    Create a new module which has a service which acts as an event listener on the server. each j2ee component on the server notify it if there is a change to them. this service, can then write the data realted to the modification on a socket which is continiously being read by the applet. So you can implement a kind of a monitor for J2ee apps with applets.
    hope this helps.
    regards,
    Abhishek.
    PS:How did you manage to adore the AWT ;-) ? I found that it sucks (good performance.. very poor lnf) ... java swing sucks too (very poor performance ... avaerage lnf).

  • Xml and applets

    I'm trying to use Sax in an applet to read an xml file. My application works fine, but when I convert it to an applet, I get errors.
    Does anybody know where I can get info and examples using Xml, Sax, and Applets? Any info would be helpful. Thanks.

    Probably nothing to do with XML. You use it in an applet precisely as you would use it in an application. You are probably running into one of the usual applet problems. Of course, this is all guesswork without any idea of what errors you are actually having.

  • Unable to execute and applet

    I'm new programmer in java. There are somme applet that run with appletwier
    but witch do not run with Internet explorer and Netscape. I'm always getting
    this error : 'Class not found'. I want to know all the steps to run and applet
    using Netscape or Internet explorer.
    I'm french speaking. Sorry if my english is poor.
    Thank's for your answers.

    I think you can't solve your problem.
    The fact is that appletviewer supports the java classes you have installed with the sun's jdk... if you are using jdk 1.3.1, it uses the java libraries included in your installed distribution. IE virtual machine, instead, uses its own library, so you can't use in your applets classes like: swing, graphics2d, and so on...
    I know that it's not a great help. Sorry!
    However, if someone could tell us how to include these classes in our CABs/JARs... i think we are really happy! :-)
    Ciao,
    Paolo.

  • Looking for WEB HOST that I can do servlets and applets on

    Hello everyone,
    Does anyone know where I can buy web space that will allow me to run a servlet and applet from. I have been shopping today and I had difficutly finding one.

    Hmm.... well duffymo. I have gone to a number of sites through Google looking for web hosting sites that support java and I must be picking all the wrong ones to look at because I have only found one in Fremont out of 25-30 that I have looked at.
    I guess duffymo you can say what you want in a forum, but usually answering a question with a question isn't very helpful nor appreciated.

  • JVM 1.4 and applet issue

    Hi,
    I'm new to Java so hopefully you'll be able to clear something up for me. I have had a look round, but am struggling due to my lack of Java knowledge.
    I have an application which passes an applet to IE. The connection is over https. With anything else other than 1.4 JVM installed, its fine, but with 1.4 I see "applet notinited" followed by "load failed".
    Both the server and client use certificates and I've been told this won't work with client certs - not sure why, so the first question...is there a bug in 1.4 related to the use of client certs?
    Here is a cut of the console log....
    lots of...loaded certificates messages (no errors/warnings)
    then....
    a connecting to the site message (no errors/warnings)
    then...
    sun.plugin.cache.DownloadException
         at sun.plugin.cache.CachedFileLoader.load(Unknown Source)
         at sun.plugin.cache.FileCache.get(Unknown Source)
         at sun.net.www.protocol.https.PluginDelegateHttpsURLConnection.connectWithCache(Unknown Source)
         at sun.net.www.protocol.https.PluginDelegateHttpsURLConnection.connect(Unknown Source)
         at sun.net.www.protocol.https.PluginDelegateHttpsURLConnection.getInputStream(Unknown Source)
         at java.net.HttpURLConnection.getResponseCode(Unknown Source)
         at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(Unknown Source)
         at sun.applet.AppletClassLoader.getBytes(Unknown Source)
         at sun.applet.AppletClassLoader.access$100(Unknown Source)
         at sun.applet.AppletClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    lots of...loaded certificates messages (no errors/warnings)
    then....
    a connecting to the site message (no errors/warnings)
    then...
    load: class com.fred.fred.fred not found.
    java.lang.ClassNotFoundException: com.fred.fred.fred
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.IOException: open HTTP connection failed.
         at sun.applet.AppletClassLoader.getBytes(Unknown Source)
         at sun.applet.AppletClassLoader.access$100(Unknown Source)
         at sun.applet.AppletClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         ... 10 more
    Exception: java.lang.ClassNotFoundException: com.fred.fred.fred
    Now, without client certificates I also have issues....so, the second question - is there something here which is not client certificate related, and although I would never speculate....https related for example?
    Thank you very much for any help

    Hi,
    Listen, Sun doesn't know exactly what they are doing.
    I installed the JDK 1.4.x on my machine b/c I need to
    run this program for my Advanced Databases course. I
    didn't install the JDK by choice. Now when I goto a
    website that has a Java applet on it, IT DOESN'T
    WORK!!!! It worked FINE with the JVM that Microsoft
    provided in Windows XP! Further, Sun DOESN'T FOLLOW
    the "Set Program Access and Defaults" in Windows XP
    SP1!!! I change the default JVM to the Microsoft JVM,
    reload IE, and then on the webpage it persists to use
    the Sun JVM!
    THANK YOU SUN FOR SCREWING WITH MY MACHINE! Have you got JRE1.4.x installed for the IE you are using.Download the java plug in for the browser and install it...
    Regards
    Vicky

Maybe you are looking for

  • IPod appears in My Computer but not in iTunes.

    I have a 30GB Video iPod, & everytime I plug it in I get a an error message that says: iPodService Module has encountered a problem and needs to close. We are sorry for the inconvenience. I'm not to sure what to do, I've tried the 5 r's & nothing hel

  • Where did my IBook app go?

    I cannot find the IBook app button. I know this is such a silly question, however after I downloaded the IBook app I assumed it would be on the home page with the other apps. I do see it listed when I click the settings app button in the left side pa

  • AIM with Windows Live Messenger buddies as some of the contacts

    Can have an AIM account with Windows Live Messenger buddies as some of the contacts? Thanks, Brandon

  • Ok, going crazy here

    Specs posted below...omit the 2000+ for a shitty 800mhz duron right now.  A week ago, this board fried my athlon xp 2000+.  somehow, after trying over and over again, I got the duron 800mhz that I have to work, and its working, but this is stupid.  T

  • ABAP WebDynPro tutorials for Roadmaps and drop-down list box

    Hi Experts,     I need some tutorials on Roadmaps and drop-down list box in ABAP WebDynPro which will show me step by step process how to create application using this. 'help.sdn' pages do show the procedures for implementing those ui elements. And a