Posted By:
Jeya_Selliah
Posted On:
Friday, February 8, 2002 07:53 AM
I have the JavaMail progem in Visual Age for Java and my Jsp code in Websphere Studio. I have the following code in my JSP code. When I executed the program, I got this problem "(3 of 5) The variable named subject is not defined" Note: I am using a form to get the inputs from the user and this form calls the following JSP code <% String aFrom,aSubject,aMessage; String[] aTo = new String[40]; try { aFrom = request.getParameter("from"); for (int i=0; i to = aTo[i]; } aSubject = re
More>>
I have the JavaMail progem in
Visual Age for Java and my Jsp code
in Websphere Studio. I have the
following code in my JSP code.
When
I executed the program, I got
this
problem "(3 of 5) The variable
named subject is not
defined"
Note: I am using a form to get the
inputs from the user and this form
calls the following JSP code
<%
String aFrom,aSubject,aMessage;
String[] aTo = new String[40];
try {
aFrom = request.getParameter("from");
for (int i=0; i
to = aTo[i];
}
aSubject = request.getParameter("subject");
aMessage = request.getParameter("message");
}
catch (Exception e){
out.println(e.getMessage() + "
" + "Problem!");
}
%>
<%
try{
javamail.sendMail(to,subject,message,from);
out.println("Your mail has been sent successfully!!
");
}
catch (Exception e){
out.println(e.getMessage() + "
" + "Couldn't send your
mail!");
}
%>