Posted By:
Jeya_Selliah
Posted On:
Monday, March 25, 2002 06:02 PM
Right now in my form I have four parameters such as subject, to, from, and message. In my jsp form I wanted to add phone parameter. Can we modify sendMail method or need to do something else or create a get and set method for phone and use it in the method of sendMail method. For eg. my approach would be:. Class file: public void setPhone(String p){ phone=p; } public String getPhone() { return phone; } in sendMail { ....... message.setPhone(phone); ....... } In Jsp file: <% String aPhone = request.getParameter(phone); ....... x.sendMail(from, to , subject, message); %> Correct
More>>
Right now in my form I have four parameters such as subject, to, from, and message. In my jsp form I wanted to add phone parameter. Can we modify sendMail method or need to do something else or create a get and set method for phone and use it in the method of sendMail method. For eg. my approach would be:.
Class file:
public void setPhone(String p){
phone=p;
}
public String getPhone() {
return phone;
}
in sendMail {
.......
message.setPhone(phone);
.......
}
In Jsp file:
<%
String aPhone = request.getParameter(phone);
.......
x.sendMail(from, to , subject, message);
%>
Correct me if I am worng. Thank you very much.
<<Less