I have this inside my DAO
public String CSNSurvey() {
StringBuilder mailstr = new StringBuilder("<html><head>");
mailstr.append("some text");
mailstr.append("some text");
mailstr.append("some text");
return mailstr.toString();
}
I can make it to work in myservlet but the question is.. How can I include a parameter inside the stringbuilder…
example mailstr.append(“some “+parameter+”text”);
please let me know you need more info to make it clearer.
Yes I need more information…
You gave the answer in your question:
This code is correct to include a dynamic parameter, even if this syntax is better:
“parameter” only needs to be a valid java variable. It can be a method parameter, a class field, or a variable declared in the method. Here are two examples: