ho un applet firmata per caricare tramite ftp i file in remoto che è sempre stata perfettamente funzionante finchè non ho dovuto importare queste classi:

import org.apache.commons.httpclient.*;
import org.apache.commons.httpclient.methods.*;

per utilizzare il seguente metodo:

////////////////////////////////////////////////////////////////////
public static String POST( String Server, //SERVER TO CONTACT
String Port, //PORT TO USE
String Script, //SCRIPT TO USE
String[] keys, //CHIAVE
String[] valori, //VALORE
String http //PROTOCOL
)
{
String url = "http://" + Server + ":" + Port +"/" +Script;
HttpClient client = new HttpClient();
//
//TIMEOUT DI CONNESSIONE
//
client.setTimeout( 80000 );
boolean isQuery = true;
NameValuePair[] params = null;
//
//CTRL QUERY
//
if( keys.length == 0 || valori.length == 0 || ( keys.length !=
valori.length ) )
{
isQuery = false;
}
try
{
HttpMethodBase method = new PostMethod( url );
method.setHttp11( true );
if( http.equalsIgnoreCase("HTTP1.0") )
{
method.setHttp11( false );
}
method.addRequestHeader( "Content-Type",
"application/x-www-form-urlencoded" );
method.addRequestHeader( "User-Agent", "Jakarta HttpClient 2.0" );
//
//IMPOSTO LA QUERY
//
StringBuffer content = new StringBuffer("");
if( isQuery )
{
params = new NameValuePair[keys.length];
for( int i = 0; i < keys.length; i++ )
{
//params[i] = new NameValuePair( keys[i], URLEncoder.encode( valori[
//i ], "ISO-8859-1" ) );
params[i] = new NameValuePair( keys[i], valori[ i ] );
if( i != 0 )
{
content.append( "&" + keys[ i ] + "=" + URLEncoder.encode( valori[
i ], "ISO-8859-1" ) );
}
else
{
content.append( keys[ i ] + "=" + URLEncoder.encode( valori[ i ],
"ISO-8859-1" ) );
}
}
//
//IMPOSTO QUERY
//
method.setQueryString( params );
}
//
//ESECUZIONE METODO
//

client.executeMethod( method );
String res = method.getResponseBodyAsString();
//InputStream ires = method.getResponseBodyAsStream();
method.releaseConnection();
return res;
}
catch( org.apache.commons.httpclient.HttpException httpe )
{
//Function.log ("http_post.POST() - HTTPE "+httpe.getMessage());
return "KO IOE INTERNAL";
}
catch ( java.io.IOException ioe )
{
//Function.log ("http_post.POST() - IOE "+ioe.getMessage());
return "KO IOE INTERNAL";
}
}

le due classi si trovano nel file commons-httpclient.jar
ovviamente se compilo in locale su jcreator tutto funziona, quando poi richiamo l'applet mi da i seguenti errori:

java.lang.NoClassDefFoundError: org/apache/commons/httpclient/HttpException
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unk nown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(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)

perchè mi da questo errore e come posso fare a fare andare la mia applet con quel metodo e con quelle librerie???