wanna use parameters from a form to use it in Authenticator

i wanna save parameters in strings in order to use them as the user and password in the Authenticator but i just cant, i try to access the string inside the constructor but it is not allowed, then i try to make a method inside the constructor it was ok but i cant access it

<%@ page import = "java.util.Properties" %>

<%@ page import = "javax.mail.*" %>

<%@ page import = "javax.mail.internet.*" %>

<%

String usr= request.getParameter("usuario");

String clve = request.getParameter("clave");

cant do this...

//Authenticathor

Authenticator auth = new Authenticator(){

private PasswordAuthentication pwdAuth = new PasswordAuthentication(usr, clve);

protected PasswordAuthentication getPasswordAuthentication() {return pwdAuth;}

};

[832 byte] By [eckoa] at [2007-11-26 21:32:08]
# 1
I can't tell what you're trying to do but I think you're having trouble with basicJava programming. The simplest solution might be to skip the use of theAuthenticator and simply use the connect method that allows you to passa username and password.
bshannona at 2007-7-10 3:12:42 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...