I'm new to using JSP so I just wrote a simple email verification code where I'm getting an error for passing value. See the code for more info
<%
String data="";
String code="";
String name =request.getParameter("username");
String email =request.getParameter("email");
String password =request.getParameter("password");
String profession =request.getParameter("profession");
data=password;
String algorithm="MD5";
data=generateHash(data,algorithm);
code=getRandomNumberString();
sendMAil(email);
%>
<%!
//password hashing....
static String uname=name;//(getting error here)name cannot be resolved to a variable
static String key=code;//(getting error here code) code cannot be resolved to a variable
my requirement is to pass Code value into key and similarly name to uname for use in functions hope u got some idea on my issue if any idea please help me Thank you.
Aucun commentaire:
Enregistrer un commentaire