blog de josh rs

Ayuda como puedo configurar las variables de contexto de glassfish para poder crear una conexion dinamicamente por URL

AYUDAAAAAAAAAAAAA

Y COMO SERIA .. EL METODO Q EN MI APPLET
Y EN EL SERVLET PARA PODER INVOCAR ESE LLAMADO

RECURSOS/CONFIGURACION

AYUDA CON ESTE ERROR-----------------------------------!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

private void writeFormFile(FormFileField formFile) throws IOException {

File file = formFile.getFile();

// create inputstream
currentFileName = file.getName();
System.out.println("CURRENT FILE "+ currentFileName);
BufferedInputStream in = new BufferedInputStream(new FileInputStream(file));

// write boundary
out.writeBytes(PREFIX);
out.writeBytes(boundary);
out.writeBytes(NEWLINE);

// write content header
out.writeBytes("Content-Disposition: form-data; name=\"" + formFile.getName() + "\"; filename=\"" + formFile.getURLEncodedUploadName() + "\"" + NEWLINE);
out.writeBytes("Content-Type: " + formFile.getContentType() + NEWLINE);
out.writeBytes(NEWLINE);

// write content
byte[] data = new byte[1024];
int len = 0;

while ((len = in.read(data, 0, data.length)) != -1) {
out.write(data, 0, len);

// update properties
bytesProcessed = bytesProcessed + len;
}

out.writeBytes(NEWLINE);
System.out.println("ANTES DEL FLUSH");
out.flush();

Como puedo solucionar este error de URL en mi metodo .???????

ESTE ES MI METODO DENTRO DE LA CLASE UploadAcionListener.

private URL getUploadURL() throws MalformedURLException {

URL uploadURL = null;

String uri = Parameters.getParameter(Parameters.UPLOAD_URL, null);

if (uri == null) {
System.out.println("URI " + uri);
throw new MalformedURLException();
}

if (!uri.startsWith("http")) {
uploadURL = new URL(uploadApplet.getCodeBase(), uri);

} else {
uploadURL = new URL(uri);
}
System.out.println("UPLOAD " + uploadURL);
return uploadURL;
}

----------------------------------------------------------------------------------------------------------------------------
ESTE ES EL ERROR AL TRATAR DE SUBIR EL ARCHIVO
UploadActionListener - actionPerformed - UploadManager - Incorrect format of uploadURL: null

AYUDA COMO ARREGLO ESTE ERROR java.lang.UnsupportedOperationException: Not yet implemented

public f(Frame paramFrame)
{
this.n = paramFrame;

//AQUI ME MANDA EL ERROR Y YA NO PUEDO HACER NADA CON LA VARIABLE O QUE VIENE DE LA CLASE L
this.o = l();

this.a = new JLabel("Proxy: ");
this.b = new JLabel(this.o.a("username") + ": ");
this.c = new JLabel(this.o.a("password") + ": ");
this.d = new JLabel("Realm: ");
this.e = new JLabel(this.o.a("scheme") + ": ");
this.f = new JLabel("");
this.g = new JLabel("");
this.h = new JLabel("Basic");
this.j.setColumns(20);
this.j.setMargin(new Insets(3, 0, 3, 0));
this.i.setMargin(new Insets(3, 0, 3, 0));
JPanel localJPanel;
(localJPanel = new JPanel()).setLayout(new GridBagLayout());
GridBagConstraints localGridBagConstraints;
(localGridBagConstraints = new GridBagConstraints()).gridx = 0;
localGridBagConstraints.gridy = 0;
localGridBagConstraints.weightx = 1.0D;
localGridBagConstraints.insets = new Insets(0, 0, 3, 0);
localGridBagConstraints.fill = 1;
localJPanel.add(this.a, localGridBagConstraints);
localGridBagConstraints.gridx = 1;
localJPanel.add(this.f, localGridBagConstraints);

Distribuir contenido