Visualizzazione dei risultati da 1 a 2 su 2

Discussione: [Java] Applet e MySQL

  1. #1

    [Java] Applet e MySQL

    una sola domandina... :gren:

    Un Applet non può accedere e scrivere sui files... e fin qui ok!

    ma può accedere ad un Database? in lettura e scrittura??? no perchè sto cercando di connettermi da mezz'ora ad un db MySQL sulla mia macchina, solo che un'applicazione va, mentre l'Applet no...



    Grazie a tutti!
    ti ricordi quando da piccoli andavamo in treno? io mettevo il culo fuori dal finestrino e tu la faccia e tutti ci chiedevano se eravamo gemelli...

  2. #2
    risolto: sulla guida in linea dei JDBC c'è scritto:


    "I'm trying to use MySQL Connector/J in an applet and I get the following
    exception:

    SQLException: Cannot connect to MySQL server on host:3306. Is there
    a MySQL server running on the machine/port you are trying to connect to?
    (java.security.AccessControlException)
    SQLState: 08S01
    VendorError: 0

    What's wrong?"

    Resolution:

    Applets can only make network connections back to the machine that the
    webserver that served the .class files for the applet. This means that
    mysql must run on the same machine (or you must have some sort of port
    re-direction) for this to work. This also means that you will not be
    able to test applets from your local filesystem, you must always deploy
    them to a webserver.
    beh ciao a tutti!!!
    ti ricordi quando da piccoli andavamo in treno? io mettevo il culo fuori dal finestrino e tu la faccia e tutti ci chiedevano se eravamo gemelli...

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.